From 4697ca0ae6b45097dee00a452104ad2e7762413e Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 4 Mar 2008 12:27:50 +0000 Subject: [PATCH] expose vserver-like distroname to specfiles --- Makefile | 2 ++ getdistro.sh | 3 ++- getreleasename.sh | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) create mode 100755 getreleasename.sh diff --git a/Makefile b/Makefile index df1c22c6..bc72f69f 100644 --- a/Makefile +++ b/Makefile @@ -97,6 +97,7 @@ PLANETLAB_RELEASE = 4.2 HOSTARCH := $(shell uname -i) DISTRO := $(shell ./getdistro.sh) RELEASE := $(shell ./getrelease.sh) +DISTRONAME := $(shell ./getdistroname.sh) RPM-INSTALL-DEVEL := rpm --force -Uvh # cannot force rpm -e RPM-UNINSTALL-DEVEL := rpm -e @@ -234,6 +235,7 @@ $($(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 distrovsname $(DISTRONAME)" >> $($(1).specpath) echo "%define pldistro $(PLDISTRO)" >> $($(1).specpath) echo "%define plrelease $(PLANETLAB_RELEASE)" >> $($(1).specpath) $(if $($(1).has-date),echo "%define date $(shell date +%Y.%m.%d)" >> $($(1).specpath),) diff --git a/getdistro.sh b/getdistro.sh index eaec7994..19ae70e9 100755 --- a/getdistro.sh +++ b/getdistro.sh @@ -2,4 +2,5 @@ . build.common -echo $pl_DISTRO \ No newline at end of file +echo $pl_DISTRO + diff --git a/getreleasename.sh b/getreleasename.sh new file mode 100755 index 00000000..7027ce96 --- /dev/null +++ b/getreleasename.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +. build.common + +echo $pl_DISTRO_NAME + -- 2.47.0