-%define name proper
+%define name codemux
%define version 0.1
-%define release 3%{?pldistro:.%{pldistro}}%{?date:.%{date}}
+%define release 7%{?pldistro:.%{pldistro}}%{?date:.%{date}}
Summary: CoDemux - HTTP port DeMux
-Name: codemux
+Name: %{name}
Version: %{version}
Release: %{release}
License: Private
Group: System Environment/Base
+Source: %{name}-%{version}.tar.gz
+Vendor: PlanetLab
+Packager: PlanetLab Central <support@planet-lab.org>
+Distribution: PlanetLab 3.0
URL: http://codeen.cs.princeton.edu/
-Source0: %{name}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-buildroot
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+#Requires: vnet
%description
+codemux is a privileged port (80) sharing service that passes traffic to and from slices via localhost ports.
+
%prep
%setup -q
%defattr(0644,root,root)
%attr(0755,root,root) %{_initrddir}/codemux
%config /etc/codemux/codemux.conf
-%attr(0755,root,root) /usr/local/planetlab/sbin/codemux
+%attr(0755,root,root) /usr/sbin/codemux
%post
chkconfig codemux reset
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
%changelog
* Sun Apr 22 2007 KYOUNGSOO PARK <kyoungso@park.cs.princeton.edu> -