# Hopefully this generic SERVICE variable will proof useful for the other services SERVICE=owsproxy TC_HOME=/usr/share/tomcat55 TC_NAME=$(SERVICE) CONTAINER_SOURCEDIR=../ # Can be automatized away as well CONTAINER_DATA=altrequestpage.jsp altresponsepage.jsp META-INF WEB-INF TEMPLATE_HOME= ../../../gispatcher/gispatcher-integration/ VERSION=2.3pre RELEASE=6gp # This is just for testing without "rpmbuild" ifndef RPM_BUILD_ROOT RPM_BUILD_ROOT=/tmp endif include $(TEMPLATE_HOME)$(SERVICE).include install: mkdir -p $(RPM_BUILD_ROOT)$(TC_TARGET)/webapps/$(SERVICE) for i in $(CONTAINER_DATA) ; do cp -ar $(CONTAINER_SOURCEDIR)$$i $(RPM_BUILD_ROOT)$(TC_TARGET)/webapps/$(SERVICE) ; done mkdir -p $(RPM_BUILD_ROOT)/usr/share/doc/deegree-$(SERVICE) # Moving the *.jar files from /opt/gispatcher/owsproxy/webapps/owsproxy/WEB-INF/lib to # /opt/gispatcher/owsproxy/shared/lib mkdir -p $(RPM_BUILD_ROOT)/opt/gispatcher/$(SERVICE)/shared/lib mv $(RPM_BUILD_ROOT)$(TC_TARGET)/webapps/$(SERVICE)/WEB-INF/lib/*.jar $(RPM_BUILD_ROOT)/opt/gispatcher/$(SERVICE)/shared/lib/ rmdir $(RPM_BUILD_ROOT)$(TC_TARGET)/webapps/$(SERVICE)/WEB-INF/lib cp $(CONTAINER_SOURCEDIR)create-security-postgres.sql $(RPM_BUILD_ROOT)/usr/share/doc/deegree-$(SERVICE)/ cp copy_context.sh $(RPM_BUILD_ROOT)/usr/share/doc/deegree-$(SERVICE)/ # include2sed.pl takes as a single argument string a list of Makefiles to check for # replacement mappings RPM_BUILD_ROOT=$(RPM_BUILD_ROOT) TC_TARGET=$(TC_TARGET) TC_NAME=$(TC_NAME) perl include2sed.pl "$(TEMPLATE_HOME)basic.include $(TEMPLATE_HOME)owsproxy.include db.include" #TODO: replace.sh and include2sed.pl should both use include files as arguments. RPM_BUILD_ROOT=$(RPM_BUILD_ROOT) TC_TARGET=$(TC_TARGET) TC_NAME=$(TC_NAME) sh replace.sh rpm: rpmsource rpmbuild --target i586 -ba $(SERVICE).spec rpmsource: # Because of using the Makefile *.include variables, I need to put the entire source # of gispatcher into the SOURCES directory tar. # TODO: This should be changed to perhaps copying the necessary files into a rpm/templates/ directory. cd ../../.. && \ mkdir -p /tmp/deegree-owsproxy-$(VERSION)-$(RELEASE) && \ cp -ar deegree gispatcher /tmp/deegree-owsproxy-$(VERSION)-$(RELEASE)/ && \ find /tmp/deegree-owsproxy-$(VERSION)-$(RELEASE) -type d -name .svn |xargs rm -rf cd /tmp && \ tar cfzv ~/rpms/SOURCES/deegree-owsproxy-$(VERSION)-$(RELEASE).tar.gz deegree-owsproxy-$(VERSION)-$(RELEASE) && \ rm -rf /tmp/deegree-owsproxy-$(VERSION)-$(RELEASE) && \ cd - \ clean: rm -f replace.m4 rm -f replace.sed .PHONY: rpm rpmsource