expose vserver-like distroname to specfiles
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 4 Mar 2008 12:27:50 +0000 (12:27 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 4 Mar 2008 12:27:50 +0000 (12:27 +0000)
Makefile
getdistro.sh
getreleasename.sh [new file with mode: 0755]

index df1c22c..bc72f69 100644 (file)
--- 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),)
index eaec799..19ae70e 100755 (executable)
@@ -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 (executable)
index 0000000..7027ce9
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+. build.common
+
+echo $pl_DISTRO_NAME
+