Stable tag.
[codemux.git] / codemux.spec
1 #
2 # $Id$
3 #
4 %define url $URL$
5
6 %define name codemux 
7 %define version 0.1
8 %define taglevel 9
9
10 %define release %{taglevel}%{?pldistro:.%{pldistro}}%{?date:.%{date}}
11
12 Summary: CoDemux - HTTP port DeMux
13 Name: %{name} 
14 Version: %{version}
15 Release: %{release}
16 License: Private
17 Group: System Environment/Base
18 Source: %{name}-%{version}.tar.gz
19 Vendor: PlanetLab
20 Packager: PlanetLab Central <support@planet-lab.org>
21 Distribution: PlanetLab %{plrelease}
22 URL: %(echo %{url} | cut -d ' ' -f 2)
23 #URL: http://codeen.cs.princeton.edu/
24 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
25 #Requires: vnet
26
27 %description
28 codemux is a privileged port (80) sharing service that passes traffic to and from slices via localhost ports.
29
30
31 %prep
32 %setup -q
33
34 make clean
35
36 %build
37 make RPM_VERSION=%{version}.%{taglevel}
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41 make INSTALL_ROOT=$RPM_BUILD_ROOT install
42 install -D -m 644 codemux.logrotate $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/codemux
43
44 %clean
45 rm -rf $RPM_BUILD_ROOT
46
47 %files
48 %defattr(0644,root,root)
49 %attr(0755,root,root) %{_initrddir}/codemux
50 %config /etc/codemux/codemux.conf
51 %attr(0755,root,root) /usr/sbin/codemux
52 %{_sysconfdir}/logrotate.d/codemux
53
54 %post
55 chkconfig codemux reset
56
57 if [ -z "$PL_BOOTCD" ]; then
58     /etc/init.d/codemux restart
59 fi
60
61 %preun
62 if [ "$1" = 0 ]; then
63     # erase, not upgrade
64     chkconfig --del codemux
65
66     # stop daemon if its currently running
67     if [ "`/etc/init.d/codemux status`" = "running" ]; then
68         /etc/init.d/codemux stop
69     fi
70 fi
71
72 %changelog
73 * Fri Mar 28 2008 Faiyaz Ahmed <faiyaza@cs.princeton.edu> - CoDemux-0.1-7 CoDemux-0.1-8
74
75
76 * Sun Apr 22 2007 KYOUNGSOO PARK <kyoungso@park.cs.princeton.edu> - 
77 - Initial build.
78