X-Git-Url: http://git.onelab.eu/?p=libvirt.git;a=blobdiff_plain;f=Makefile;h=a07837a3ba86913005846d947bdda920ae65fa05;hp=b3b6883ccaa2749053ead894c3623a98c7653402;hb=e7f2e76d05918340ed4f26742048a0e9b192e941;hpb=2cf657125a850e945cb5f286621144177e2926d3 diff --git a/Makefile b/Makefile index b3b6883..a07837a 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,13 @@ WEBFETCH := wget SHA1SUM := sha1sum +# tried to download this on the fly using git archive at git://libvirt.org/libvirt.git +# but it feels like git archive is not supported/allowed there ALL += libvirt -libvirt-URL := ftp://libvirt.org/libvirt/libvirt-0.9.9.tar.gz -libvirt-SHA1SUM := d716303b4b00c2d8cc0ebd7e1a853e238d9723f8 -libvirt := $(notdir $(libvirt-URL)) +libvirt-URL1 := http://mirror.onelab.eu/third-party/libvirt-1.0.4.tar.gz +libvirt-URL2 := http://planet-lab.org/third-party/libvirt-1.0.4.tar.gz +libvirt-SHA1SUM := 45e74a9a4c3a88c98ac4ae5d8200ea65c42b6951 +libvirt := $(notdir $(libvirt-URL1)) all: $(ALL) .PHONY: all @@ -12,18 +15,20 @@ all: $(ALL) ############################## define download_target $(1): $($(1)) -.PHONY: $($(1)) +.PHONY: $(1) $($(1)): - @if [ ! -e "$($(1))" ] ; then echo "$(WEBFETCH) $($(1)-URL)" ; $(WEBFETCH) $($(1)-URL) ; fi - @if [ ! -e "$($(1))" ] ; then echo "Could not download source file: $($(1)) does not exist" ; exit 1 ; fi - @if test "$$$$($(SHA1SUM) $($(1)) | awk '{print $$$$1}')" != "$($(1)-SHA1SUM)" ; then \ - echo "sha1sum of the downloaded $($(1)) does not match the one from 'Makefile'" ; \ - echo "Local copy: $$$$($(SHA1SUM) $($(1)))" ; \ - echo "In Makefile: $($(1)-SHA1SUM)" ; \ - false ; \ - else \ - ls -l $($(1)) ; \ - fi + @if [ ! -e "$($(1))" ] ; then \ + { echo Using primary; echo "$(WEBFETCH) $($(1)-URL1)" ; $(WEBFETCH) $($(1)-URL1) ; } || \ + { echo Using secondary; echo "$(WEBFETCH) $($(1)-URL2)" ; $(WEBFETCH) $($(1)-URL2) ; } ; fi + @if [ ! -e "$($(1))" ] ; then echo "Could not download source file: $($(1)) does not exist" ; exit 1 ; fi + @if test "$$$$($(SHA1SUM) $($(1)) | awk '{print $$$$1}')" != "$($(1)-SHA1SUM)" ; then \ + echo "sha1sum of the downloaded $($(1)) does not match the one from 'Makefile'" ; \ + echo "Local copy: $$$$($(SHA1SUM) $($(1)))" ; \ + echo "In Makefile: $($(1)-SHA1SUM)" ; \ + false ; \ + else \ + ls -l $($(1)) ; \ + fi endef $(eval $(call download_target,libvirt)) @@ -38,12 +43,12 @@ SPECFILE = libvirt.spec PWD=$(shell pwd) PREPARCH ?= noarch RPMDIRDEFS = --define "_sourcedir $(PWD)" --define "_builddir $(PWD)" --define "_srcrpmdir $(PWD)" --define "_rpmdir $(PWD)" -BUILDOPTS = --without storage-disk --without storage-iscsi --without storage-scsi \ - --without storage-fs --without storage-lvm \ - --without polkit --without sasl --without audit --with capng --with udev \ - --without netcf --without avahi \ - --without xen --without qemu --without hyperv --without phyp --without esx \ - --define 'packager PlanetLab' +BUILDOPTS = --without xen --without qemu --without hyperv --without phyp --without esx \ + --without netcf --without avahi --without polkit --without sasl --without audit \ + --without storage-iscsi --without storage-scsi --without storage-disk \ + --without storage-rbd --without selinux --without dtrace --without sanlock \ + --without libxl --without vbox --with capng --with udev --with interface \ + --define 'packager PlanetLab' trees: sources rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bp --target $(PREPARCH) $(SPECFILE)