X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=Makefile;h=8249c4a9ffcea108044b3e68b2e9969456de0dd1;hb=d526ad0102fbd694af7e83ee95646e977a89ec86;hp=e329d0ce9a93f16b648518b31737d948e9697ad2;hpb=d3444a423880c1556e1f9ed25f28cf7c7330a856;p=linux-2.6.git diff --git a/Makefile b/Makefile index e329d0ce9..8249c4a9f 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,4 @@ # -# $Id$ -# $URL$ -# CURL ?= $(shell if test -f /usr/bin/curl ; then echo "curl -H Pragma: -O -R -S --fail --show-error" ; fi) WGET ?= $(shell if test -f /usr/bin/wget ; then echo "wget -nd -m" ; fi) CLIENT ?= $(if $(CURL),$(CURL),$(if $(WGET),$(WGET))) @@ -35,16 +32,21 @@ endif define get_sources_sha1 $(shell cat sources 2>/dev/null | awk 'gensub("^.*/", "", 1, $$2) == "$@" { print $$1; exit; }') endef -define get_sources_url +define get_sources_url1 $(shell cat sources 2>/dev/null | awk 'gensub("^.*/", "", 1, $$2) == "$@" { print $$2; exit; }') endef +define get_sources_url2 +$(shell cat sources 2>/dev/null | awk 'gensub("^.*/", "", 1, $$2) == "$@" { print $$3; exit; }') +endef SOURCEFILES := $(shell cat sources 2>/dev/null | awk '{ print gensub("^.*/", "", 1, $$2) }') SOURCE_RPM := $(firstword $(SOURCEFILES)) sources: $(SOURCEFILES) $(TARGETS) $(SOURCEFILES): #FORCE - @if [ ! -e "$@" ] ; then echo "$(CLIENT) $(get_sources_url)" ; $(CLIENT) $(get_sources_url) ; fi + @if [ ! -e "$@" ] ; then \ + { echo Using primary; echo "$(CLIENT) $(get_sources_url1)" ; $(CLIENT) $(get_sources_url1) ; } || \ + { echo Using secondary; echo "$(CLIENT) $(get_sources_url2)" ; $(CLIENT) $(get_sources_url2) ; } ; fi @if [ ! -e "$@" ] ; then echo "Could not download source file: $@ does not exist" ; exit 1 ; fi @if test "$$(sha1sum $@ | awk '{print $$1}')" != "$(get_sources_sha1)" ; then \ echo "sha1sum of the downloaded $@ does not match the one from 'sources' file" ; \ @@ -89,9 +91,8 @@ srpm: sources cp ../$(notdir $(SPECFILE)) . ; cp ../linux-*.patch .; cp ../config-vserver . ; cp ../config-planetlab .; \ for downloaded in $(SOURCEFILES) ; do cp ../$$downloaded . ; done ; \ cat config-vserver >> config-generic ; \ - cat config-planetlab >> config-generic ; \ - sed -i -e s,CONFIG_IPV6=m,CONFIG_IPV6=y, config-generic ;\ - sed -e -e s,CONFIG_MODULE_SIG=y,CONFIG_MODULE_SIG=n, config-generic-rhel) + cat config-planetlab >> config-generic) + ./modify_rh_config.sh ./rpmmacros.sh export HOME=$(shell pwd) ; rpmbuild $(RPMDIRDEFS) $(RPMDEFS) --nodeps -bs $(SPECFILE)