From a4358bcba54c48fc31c19e2de01508b356791a5c Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 23 Nov 2007 08:55:44 +0000 Subject: [PATCH] distroname and distrorelease exported in all specfiles, as was pldistro --- Makefile | 6 +++++- planetlab.mk | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8f7e9776..280d2d35 100644 --- a/Makefile +++ b/Makefile @@ -245,8 +245,12 @@ $(foreach package, $(ALL), $(eval $(call package_hasdate,$(package)))) define target_spec $($(1)_specpath): mkdir -p SPECS - echo "%define pldistro $(PLDISTRO)" > $($(1)_specpath) + (echo -n "# Generated by planetlab build from $($(1)-SPEC) on " ; date) > $($(1)_specpath) + echo "%define distroname $(DISTRO)" >> $($(1)_specpath) + echo "%define distrorelease $(RELEASE)" >> $($(1)_specpath) + echo "%define pldistro $(PLDISTRO)" >> $($(1)_specpath) $(if $($(1)_hasdate),echo "%define date $(shell date +%Y.%m.%d)" >> $($(1)_specpath),) + echo "# included from codebase specfile" >> $($(1)_specpath) $(if $($(1)-SPECVARS), \ $(foreach line,$($(1)-SPECVARS), \ echo "%define" $(word 1,$(subst =, ,$(line))) "$(word 2,$(subst =, ,$(line)))" >> $($(1)_specpath) ;)) diff --git a/planetlab.mk b/planetlab.mk index b480d862..a100aa0d 100644 --- a/planetlab.mk +++ b/planetlab.mk @@ -115,7 +115,6 @@ ALL += ulogd # netflow-MODULES := PlanetFlow netflow-SPEC := netflow.spec -netflow-SPECVARS := distroname=$(DISTRO) distrorelease=$(RELEASE) ALL += netflow # @@ -265,5 +264,4 @@ myplc-devel-RPMBUILD := sudo bash ./rpmbuild.sh # myplc-devel-native-MODULES := MyPLC myplc-devel-native-SPEC := myplc-devel-native.spec -myplc-devel-native-SPECVARS := distroname=$(DISTRO) distrorelease=$(RELEASE) #ALL += myplc-devel-native -- 2.47.0