erroneously checked in
[codemux.git] / codemux.spec
1 Summary: CoDemux - HTTP port demultiplexer
2 Name: codemux
3 Version: 0.5
4 Release: 1
5 License: Private
6 Group: System Environment/Base
7 URL: http://codeen.cs.princeton.edu/
8 Source0: %{name}-%{version}.tar.gz
9 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
10
11 %description
12
13 %prep
14 %setup -q
15
16 make clean
17
18 %build
19 make
20
21 %install
22 rm -rf $RPM_BUILD_ROOT
23
24 make INSTALL_ROOT=$RPM_BUILD_ROOT install-all
25
26 # Build and install in %post so that it gets put in the right site-packages directory
27 #rm -rf $RPM_BUILD_ROOT/usr/lib/python*
28 #install -D -m 755 python/Proper.py $RPM_BUILD_ROOT/%{_datadir}/%{name}/Proper.py
29
30 %clean
31 rm -rf $RPM_BUILD_ROOT
32
33 %files
34 %defattr(-,root,root,-)
35 %attr(0755,root,root) %{_initrddir}/codemux
36 %config /etc/codemux/codemux.conf
37 %attr(0755,root,root) /usr/local/planetlab/sbin/codemux
38
39 %post
40 chkconfig codemux reset
41
42 if [ -z "$PL_BOOTCD" ]; then
43     /sbin/ldconfig
44     /etc/init.d/codemux restart
45 fi
46
47 %preun
48 if [ "$1" = 0 ]; then
49     # erase, not upgrade
50     chkconfig --del codemux
51
52     # stop daemon if its currently running
53     if [ "`/etc/init.d/codemux status`" = "running" ]; then
54         /etc/init.d/codemux stop
55     fi
56 fi
57
58 %doc
59
60 %changelog
61 * Sun Apr 22 2007 KYOUNGSOO PARK <kyoungso@park.cs.princeton.edu> - 
62 - Initial build.
63