3 # Build 3rd party rpms like php-htmlpurifier, php-jpgraph.
5 # Once built, packages are in $RPM_TMP
7 RPM_TMP=$(HOME)/rpmbuild
9 BUILDRESULT=$(HOME)/fusionforge_repo
11 HTMLPURIFIER_VERSION=4.4.0
12 HTMLPURIFIER_SPEC=php-htmlpurifier/php-htmlpurifier.spec
13 HTMLPURIFIER_TBZ=htmlpurifier-$(HTMLPURIFIER_VERSION).tar.gz
14 HTMLPURIFIER_RPM=php-htmlpurifier-$(HTMLPURIFIER_VERSION)-1.noarch.rpm
16 WEBDAV_SERVER_VERSION=1.0.0RC5
17 WEBDAV_SERVER_SPEC=php-pear-HTTP_WebDAV_Server/php-pear-HTTP_WebDAV_Server.spec
18 WEBDAV_SERVER_TBZ=HTTP_WebDAV_Server-$(WEBDAV_SERVER_VERSION).tgz
19 WEBDAV_SERVER_RPM=php-pear-HTTP_WebDAV_Server-$(WEBDAV_SERVER_VERSION)-1.noarch.rpm
22 JPGRAPH_SPEC=php-jpgraph/php-jpgraph.spec
23 JPGRAPH_TBZ=jpgraph-$(JPGRAPH_VERSION).tar.gz
24 JPGRAPH_RPM=php-jpgraph-$(JPGRAPH_VERSION)-1.noarch.rpm
25 JPGRAPH_DIFF=libphp-jpgraph_$(JPGRAPH_VERSION)-12.diff
27 default: php-htmlpurifier php-jpgraph php-pear-HTTP_WebDAV_Server dist getselenium
32 -rm -Rf $(HOME)/.rpmmacros $(RPM_TMP) $(DEPOT) $(BUILDRESULT)
34 rpmprep: $(HOME)/.rpmmacros
38 sh ../tools/rpmdev-setuptree
39 echo '%_tmppath %{_topdir}/TMP' >> ~/.rpmmacros
40 echo '%_buildroot %{_tmppath}/%{name}-root' >> ~/.rpmmacros
41 echo '%_sysconfdir /etc' >> ~/.rpmmacros
42 [ -d $(RPM_TMP)/TMP ] || mkdir $(RPM_TMP)/TMP
45 -mkdir -p $(BUILDRESULT)
46 cp $(RPM_TMP)/RPMS/noarch/*.rpm $(BUILDRESULT)
47 createrepo $(BUILDRESULT) 2>&1 | grep -v DeprecationWarning
50 cd selenium ; make getselenium
52 # Building RPM for external components
55 php-jpgraph: rpmprep $(BUILDRESULT)/$(JPGRAPH_RPM)
57 $(BUILDRESULT)/$(JPGRAPH_RPM): $(JPGRAPH_SPEC) $(RPM_TMP)/SOURCES/$(JPGRAPH_TBZ)
58 rpmbuild --quiet --clean -ba $(JPGRAPH_SPEC)
60 $(RPM_TMP)/SOURCES/$(JPGRAPH_TBZ):
61 cp php-jpgraph/libphp-jpgraph_$(JPGRAPH_VERSION).orig.tar.gz $@
62 zcat php-jpgraph/$(JPGRAPH_DIFF).gz > $(RPM_TMP)/SOURCES/$(JPGRAPH_DIFF)
63 cp php-jpgraph/*.patch $(RPM_TMP)/SOURCES/
66 php-htmlpurifier: rpmprep $(BUILDRESULT)/$(HTMLPURIFIER_RPM)
68 $(BUILDRESULT)/$(HTMLPURIFIER_RPM): $(HTMLPURIFIER_SPEC) $(RPM_TMP)/SOURCES/$(HTMLPURIFIER_TBZ)
69 rpmbuild --quiet --clean -ba $(HTMLPURIFIER_SPEC)
71 $(RPM_TMP)/SOURCES/$(HTMLPURIFIER_TBZ): $(DEPOT)/$(HTMLPURIFIER_TBZ)
72 cp $(DEPOT)/$(HTMLPURIFIER_TBZ) $@
74 $(DEPOT)/$(HTMLPURIFIER_TBZ): $(DEPOT) rpmprep
75 @cd $(DEPOT); [ -f $@ ] || wget -q -N http://htmlpurifier.org/releases/$(HTMLPURIFIER_TBZ)
78 php-pear-HTTP_WebDAV_Server: rpmprep $(BUILDRESULT)/$(WEBDAV_SERVER_RPM)
80 $(BUILDRESULT)/$(WEBDAV_SERVER_RPM): $(WEBDAV_SERVER_SPEC) $(RPM_TMP)/SOURCES/$(WEBDAV_SERVER_TBZ)
81 rpmbuild --quiet --clean -ba $(WEBDAV_SERVER_SPEC)
83 $(RPM_TMP)/SOURCES/$(WEBDAV_SERVER_TBZ): $(DEPOT)/$(WEBDAV_SERVER_TBZ)
84 cp $(DEPOT)/$(WEBDAV_SERVER_TBZ) $@
86 $(DEPOT)/$(WEBDAV_SERVER_TBZ): $(DEPOT) rpmprep
87 @cd $(DEPOT); [ -f $@ ] || wget -q -N http://download.pear.php.net/package/$(WEBDAV_SERVER_TBZ)
91 @[ -d "$(DEPOT)" ] || mkdir $(DEPOT)