101464d2fa9278edf191c3f7c2382631238e95d5
[codemux.git] / codemux.spec
1 %define name codemux 
2 %define version 0.1
3 %define release 4%{?pldistro:.%{pldistro}}%{?date:.%{date}}
4
5 Summary: CoDemux - HTTP port DeMux
6 Name: codemux
7 Version: %{version}
8 Release: %{release}
9 License: Private
10 Group: System Environment/Base
11 URL: http://codeen.cs.princeton.edu/
12 Source0: %{name}-%{version}.tar.gz
13 BuildRoot: %{_tmppath}/%{name}-buildroot
14
15 %description
16
17 %prep
18 %setup -q
19
20 make clean
21
22 %build
23 make
24
25 %install
26 rm -rf $RPM_BUILD_ROOT
27
28 make INSTALL_ROOT=$RPM_BUILD_ROOT install
29
30 %clean
31 rm -rf $RPM_BUILD_ROOT
32
33 %files
34 %defattr(0644,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     /etc/init.d/codemux restart
44 fi
45
46 %preun
47 if [ "$1" = 0 ]; then
48     # erase, not upgrade
49     chkconfig --del codemux
50
51     # stop daemon if its currently running
52     if [ "`/etc/init.d/codemux status`" = "running" ]; then
53         /etc/init.d/codemux stop
54     fi
55 fi
56
57 %changelog
58 * Sun Apr 22 2007 KYOUNGSOO PARK <kyoungso@park.cs.princeton.edu> - 
59 - Initial build.
60