X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=dd8d1d0d8143e44a1b373d2db7e3c487d17a0ed7;hb=43ab4af2bd2203347ad0dd2db0c90d3a938133a0;hp=4fda659dc4968faa6b7f9580efaf7be4978bf22c;hpb=db5ef3f969fc6ad34aeb5903e44d0049b2e50791;p=util-vserver.git diff --git a/Makefile b/Makefile index 4fda659..dd8d1d0 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,11 @@ -# $Id$ -# $URL$ # WEBFETCH := wget SHA1SUM := sha1sum ALL += util-vserver -util-vserver-URL := http://build.planet-lab.org/third-party/util-vserver-0.30.216-pre2883.tar.bz2 -util-vserver-SHA1SUM := 232282d9093adecb5b365cc8afb669fd2910c5f9 +util-vserver-URL1 := http://build.planet-lab.org/third-party/util-vserver-0.30.216-pre2939.tar.bz2 +util-vserver-URL2 := http://mirror.onelab.eu/third-party/util-vserver-0.30.216-pre2939.tar.bz2 +util-vserver-SHA1SUM := 2fc905190fed57a4a31b6191c6d085cd699e65b6 util-vserver := $(notdir $(util-vserver-URL)) all: $(ALL) @@ -17,7 +16,9 @@ define download_target $(1): $($(1)) .PHONY: $($(1)) $($(1)): - @if [ ! -e "$($(1))" ] ; then echo "$(WEBFETCH) $($(1)-URL)" ; $(WEBFETCH) $($(1)-URL) ; fi + @if [ ! -e "$($(1))" ] ; then \ + { echo Using primary; echo "$(WEBFETCH) $($(1)-URL1)" ; $(WEBFETCH) $($(1)-URL1) ; } || \ + { echo Using primary; 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'" ; \