ready for RPM building
[codemux.git] / codemux.spec
index b212ece..337de1c 100644 (file)
@@ -1,12 +1,16 @@
-Summary: CoDemux - HTTP port demultiplexer
+%define name proper
+%define version 0.1
+%define release 3%{?pldistro:.%{pldistro}}%{?date:.%{date}}
+
+Summary: CoDemux - HTTP port DeMux
 Name: codemux
-Version: 0.4
-Release: 1
+Version: %{version}
+Release: %{release}
 License: Private
 Group: System Environment/Base
 URL: http://codeen.cs.princeton.edu/
 Source0: %{name}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+BuildRoot: %{_tmppath}/%{name}-buildroot
 
 %description
 
@@ -21,13 +25,13 @@ make
 %install
 rm -rf $RPM_BUILD_ROOT
 
-make install
+make INSTALL_ROOT=$RPM_BUILD_ROOT install
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
 %files
-%defattr(0644,root,root,)
+%defattr(0644,root,root)
 %attr(0755,root,root) %{_initrddir}/codemux
 %config /etc/codemux/codemux.conf
 %attr(0755,root,root) /usr/local/planetlab/sbin/codemux
@@ -36,22 +40,20 @@ rm -rf $RPM_BUILD_ROOT
 chkconfig codemux reset
 
 if [ -z "$PL_BOOTCD" ]; then
-    /sbin/ldconfig
     /etc/init.d/codemux restart
 fi
 
 %preun
-if [ "$1" = 0 ]; then
+#if [ "$1" = 0 ]; then
     # erase, not upgrade
-    chkconfig --del codemux
+#    chkconfig --del codemux
 
     # stop daemon if its currently running
-    if [ "`/etc/init.d/codemux status`" = "running" ]; then
-       /etc/init.d/codemux stop
-    fi
-fi
-
-%doc
+#    if [ "`/etc/init.d/codemux status`" = "running" ]; then
+#      /etc/init.d/codemux stop
+#    fi
+#fi
+# %doc
 
 %changelog
 * Sun Apr 22 2007 KYOUNGSOO PARK <kyoungso@park.cs.princeton.edu> -