- do not generate sysconfig files
[myplc.git] / myplc.spec
index 7e0c930..0a6a188 100644 (file)
@@ -1,13 +1,13 @@
 Vendor: PlanetLab
 Packager: PlanetLab Central <support@planet-lab.org>
-Distribution: PlanetLab 3.3
+Distribution: PlanetLab 4.0
 URL: http://cvs.planet-lab.org/cvs/myplc
 
 Summary: PlanetLab Central (PLC) Portable Installation
 Name: myplc
-Version: 0.2
+Version: 0.5
 Release: 1%{?pldistro:.%{pldistro}}%{?date:.%{date}}
-License: BSD
+License: PlanetLab
 Group: Applications/Systems
 Source0: %{name}-%{version}.tar.gz
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -28,10 +28,7 @@ system.
 
 %build
 pushd myplc
-./build.sh -r 2 -d %{_datadir}
-# Not until we can get the build server to run Fedora Core 4 or an
-# updated version of yum.
-#./build.sh -r 4 -d %{_datadir}
+./build.sh
 popd
 
 %install
@@ -70,15 +67,25 @@ if [ -n "$SUDO_USER" ] ; then
     chown -R $SUDO_USER %{_rpmdir}/%{_arch}
 fi
 
+%pre
+if [ -x %{_sysconfdir}/init.d/plc ] ; then
+    service plc stop
+fi
+
 %post
-chkconfig --add plc
-chkconfig plc on
+if [ -x /sbin/chkconfig ] ; then
+    /sbin/chkconfig --add plc
+    /sbin/chkconfig plc on
+fi
 
 %preun
 # 0 = erase, 1 = upgrade
 if [ $1 -eq 0 ] ; then
-    chkconfig plc off
-    chkconfig --del plc
+    %{_sysconfdir}/init.d/plc stop
+    if [ -x /sbin/chkconfig ] ; then
+        /sbin/chkconfig plc off
+       /sbin/chkconfig --del plc
+    fi
 fi
 
 %files
@@ -96,7 +103,7 @@ fi
 
 # Data directory
 %dir /plc/data
-%config(noreplace) /plc/data
+%config(noreplace) /plc/data/*
 
 %changelog
 * Wed Apr  5 2006 Mark Huang <mlhuang@CS.Princeton.EDU> - 0.2-1