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