restored former specfile as it contains taglevel information needed by module-tag
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 27 Mar 2008 09:59:25 +0000 (09:59 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Thu, 27 Mar 2008 09:59:25 +0000 (09:59 +0000)
removed version had-coded in codemux.c and passes rpm version number instead

Makefile
codemux.c
codemux.spec

index 2024ca4..60462a6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
+# overridden when invoked through rpmbuild
+RPM_VERSION=0.0
 CC = gcc
-CFLAGS = -Wall -O 
+CFLAGS = -Wall -O -DRPM_VERSION=\"$(RPM_VERSION)\"
 
 TARGS = codemux
 
index 31a4dfc..efc8b1c 100644 (file)
--- a/codemux.c
+++ b/codemux.c
@@ -37,8 +37,8 @@ int defaultTraceSync;
    among them */
 #define FAIRNESS_CUTOFF (MAX_CONNS * 0.85)
 
-/* codemux version */
-#define CODEMUX_VERSION "0.4"
+/* codemux version, from Makefile, or specfile */
+#define CODEMUX_VERSION RPM_VERSION
 
 typedef struct FlowBuf {
   int fb_refs;                 /* num refs */
index e0c4c89..b7d2e21 100644 (file)
@@ -1,6 +1,13 @@
+#
+# $Id$
+#
+%define url $URL$
+
 %define name codemux 
 %define version 0.1
-%define release 8%{?pldistro:.%{pldistro}}%{?date:.%{date}}
+%define taglevel 7
+
+%define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
 
 Summary: CoDemux - HTTP port DeMux
 Name: %{name} 
@@ -11,8 +18,9 @@ Group: System Environment/Base
 Source: %{name}-%{version}.tar.gz
 Vendor: PlanetLab
 Packager: PlanetLab Central <support@planet-lab.org>
-Distribution: PlanetLab 3.0
-URL: http://codeen.cs.princeton.edu/
+Distribution: PlanetLab %{plrelease}
+URL: %(echo %{url} | cut -d ' ' -f 2)
+#URL: http://codeen.cs.princeton.edu/
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 #Requires: vnet
 
@@ -26,7 +34,7 @@ codemux is a privileged port (80) sharing service that passes traffic to and fro
 make clean
 
 %build
-make
+make RPM_VERSION=%{version}.%{taglevel}
 
 %install
 rm -rf $RPM_BUILD_ROOT