2 WEBFETCH := curl -H Pragma: -O -R -S --fail --show-error
5 #http://pkg.mytestbed.net/rpm/5.3/f14/noarch/ and x86_64
6 REPO := http://mirror.onelab.eu/third-party/omf-5.3-federation-v1.3
9 omf-resctl-URL := $(REPO)/omf-resctl-5.3-5.3.1-1.noarch.rpm
10 omf-resctl-SHA1SUM := 7dcac5c8b0942566d2f0a503ce28126e79e60dbb
11 omf-resctl := $(notdir $(omf-resctl-URL))
13 omf-common-URL := $(REPO)/omf-common-5.3-5.3.1-1.noarch.rpm
14 omf-common-SHA1SUM := fa7df2e9513f165856699aeceff7d044dd709729
15 omf-common := $(notdir $(omf-common-URL))
17 liblog4r-URL := $(REPO)/liblog4r-ruby1.8-1.2-1.noarch.rpm
18 liblog4r-SHA1SUM := 32809abc26d26d9341a3bf14169701818ec61c5f
19 liblog4r := $(notdir $(liblog4r-URL))
21 libxmpp4r-URL := $(REPO)/libxmpp4r-ruby1.8-1.0-1.noarch.rpm
22 libxmpp4r-SHA1SUM := 6847f8a74e7f1e54af76f0cedd6d7582011fa037
23 libxmpp4r := $(notdir $(libxmpp4r-URL))
25 omf-expctl-URL := $(REPO)/omf-expctl-5.3-5.3.1-1.noarch.rpm
26 omf-expctl-SHA1SUM := 10ffd10a56c93db4d909cdb4e720f845ab11cf72
27 omf-expctl := $(notdir $(omf-expctl-URL))
32 ##############################
33 define download_target
37 @if [ ! -e "$($(1))" ] ; then echo "$(WEBFETCH) $($(1)-URL)" ; $(WEBFETCH) $($(1)-URL) ; fi
38 @if [ ! -e "$($(1))" ] ; then echo "Could not download source file: $($(1)) does not exist" ; exit 1 ; fi
39 @if test "$$$$($(SHA1SUM) $($(1)) | awk '{print $$$$1}')" != "$($(1)-SHA1SUM)" ; then \
40 echo "sha1sum of the downloaded $($(1)) does not match the one from 'Makefile'" ; \
41 echo "Local copy: $$$$($(SHA1SUM) $($(1)))" ; \
42 echo "In Makefile: $($(1)-SHA1SUM)" ; \
50 $(eval $(call download_target,omf-resctl))
51 $(eval $(call download_target,omf-common))
52 $(eval $(call download_target,liblog4r))
53 $(eval $(call download_target,libxmpp4r))
55 $(eval $(call download_target,omf-expctl))
61 #################### convenience, for debugging only
62 # make +foo : prints the value of $(foo)
63 # make ++foo : idem but verbose, i.e. foo=$(foo)
64 ++%: varname=$(subst +,,$@)
66 @echo "$(varname)=$($(varname))"
67 +%: varname=$(subst +,,$@)