6 # default - overridden by the build
7 SPECFILE = pyOpenSSL.spec
9 main.URL := http://build.onelab.eu/third-party/pyOpenSSL-0.9.tar.gz
10 main.SHA1SUM := d39eeb26c73e4b96804e1e403e2136062910b6c2
11 main.FILE := $(notdir $(main.URL))
13 # Thierry - when called from within the build, PWD is /build
14 SOURCEFILES := $(main.FILE)
17 @if [ ! -e "$@" ] ; then echo "$(WEBFETCH) $(main.URL)" ; $(WEBFETCH) $(main.URL) ; fi
18 @if [ ! -e "$@" ] ; then echo "Could not download source file: $@ does not exist" ; exit 1 ; fi
19 @if test "$$(sha1sum $@ | awk '{print $$1}')" != "$(main.SHA1SUM)" ; then \
20 echo "sha1sum of the downloaded $@ does not match the one from 'sources' file" ; \
21 echo "Local copy: $$(sha1sum $@)" ; \
22 echo "In sources: $$(grep $@ sources)" ; \
28 sources: $(SOURCEFILES)
33 RPMDIRDEFS = --define "_sourcedir $(PWD)" --define "_builddir $(PWD)" --define "_srcrpmdir $(PWD)" --define "_rpmdir $(PWD)"
35 rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bp --target $(PREPARCH) $(SPECFILE)
38 rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bs $(SPECFILE)
40 TARGET ?= $(shell uname -m)
42 rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps --target $(TARGET) -bb $(SPECFILE)
45 rm -f *.rpm *.tgz *.bz2 *.gz
47 ++%: varname=$(subst +,,$@)
49 @echo "$(varname)=$($(varname))"
50 +%: varname=$(subst +,,$@)