From 19f3a97f9059c29e86c3642e880bdc7911466c82 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 27 Mar 2008 09:59:25 +0000 Subject: [PATCH] restored former specfile as it contains taglevel information needed by module-tag removed version had-coded in codemux.c and passes rpm version number instead --- Makefile | 4 +++- codemux.c | 4 ++-- codemux.spec | 16 ++++++++++++---- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 2024ca4..60462a6 100644 --- 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 diff --git a/codemux.c b/codemux.c index 31a4dfc..efc8b1c 100644 --- 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 */ diff --git a/codemux.spec b/codemux.spec index e0c4c89..b7d2e21 100644 --- a/codemux.spec +++ b/codemux.spec @@ -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 -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 -- 2.43.0