X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=6068eac7e1f6dce4265eb28e1a7895f6578ee4b7;hb=3cf44b4a6bde4f5cc6c8ce22515e5a75c42dd98c;hp=e85915b8c6b1ac2c515c84147ce9f78d6b81d726;hpb=43684bed05aa75dee339ae7f22ceef129294ac66;p=util-vserver.git diff --git a/Makefile b/Makefile index e85915b..6068eac 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,12 @@ -# $Id$ -# $URL$ # WEBFETCH := wget SHA1SUM := sha1sum ALL += util-vserver -util-vserver-URL := http://build.planet-lab.org/third-party/util-vserver-0.30.216-pre2913.tar.bz2 -util-vserver-SHA1SUM := a52b6cdc7137c8807a7b6e69836e6a0298c7e1f6 -util-vserver := $(notdir $(util-vserver-URL)) +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-URL1)) all: $(ALL) .PHONY: 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'" ; \