bd065a65d911252c3203d4bdd0a53ccae3f0f8fb
[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 7
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
38
39 %install
40 rm -rf $RPM_BUILD_ROOT
41
42 make INSTALL_ROOT=$RPM_BUILD_ROOT install
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
53 %post
54 chkconfig codemux reset
55
56 if [ -z "$PL_BOOTCD" ]; then
57     /etc/init.d/codemux restart
58 fi
59
60 %preun
61 if [ "$1" = 0 ]; then
62     # erase, not upgrade
63     chkconfig --del codemux
64
65     # stop daemon if its currently running
66     if [ "`/etc/init.d/codemux status`" = "running" ]; then
67         /etc/init.d/codemux stop
68     fi
69 fi
70
71 %changelog
72 * Sun Apr 22 2007 KYOUNGSOO PARK <kyoungso@park.cs.princeton.edu> - 
73 - Initial build.
74