6 autoconf := autoconf-2.69.tar.gz
7 autoconf-SHA1SUM := 328e7dd6c1074bf4cf5360c7a0b025da51c36062
8 autoconf-URL1 := http://build.planet-lab.org/third-party/$(autoconf)
9 autoconf-URL2 := http://mirror.onelab.eu/third-party/$(autoconf)
14 ##############################
15 define download_target
19 @if [ ! -e "$($(1))" ] ; then \
20 { echo Using primary; echo "$(WEBFETCH) $($(1)-URL1)" ; $(WEBFETCH) $($(1)-URL1) ; } || \
21 { echo Using secondary; echo "$(WEBFETCH) $($(1)-URL2)" ; $(WEBFETCH) $($(1)-URL2) ; } ; fi
22 @if [ ! -e "$($(1))" ] ; then echo "Could not download source file: $($(1)) does not exist" ; exit 1 ; fi
23 @if test "$$$$($(SHA1SUM) $($(1)) | awk '{print $$$$1}')" != "$($(1)-SHA1SUM)" ; then \
24 echo "sha1sum of the downloaded $($(1)) does not match the one from 'Makefile'" ; \
25 echo "Local copy: $$$$($(SHA1SUM) $($(1)))" ; \
26 echo "In Makefile: $($(1)-SHA1SUM)" ; \
33 $(eval $(call download_target,autoconf))
39 # default - overridden by the build
40 SPECFILE = autoconf.spec
44 RPMDIRDEFS = --define "_sourcedir $(PWD)" --define "_builddir $(PWD)" --define "_srcrpmdir $(PWD)" --define "_rpmdir $(PWD)"
46 rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bp --target $(PREPARCH) $(SPECFILE)
49 rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bs $(SPECFILE)
51 TARGET ?= $(shell uname -m)
53 rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps --target $(TARGET) -bb $(SPECFILE)
56 rm -f *.rpm *.tgz *.bz2 *.gz
58 ++%: varname=$(subst +,,$@)
60 @echo "$(varname)=$($(varname))"
61 +%: varname=$(subst +,,$@)