- restore default configuration by just removing plc_config.xml and
[myplc.git] / myplc.spec
index 7e0c930..d783f72 100644 (file)
@@ -28,10 +28,10 @@ system.
 
 %build
 pushd myplc
-./build.sh -r 2 -d %{_datadir}
+./build.sh -r 2
 # 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 -r 4
 popd
 
 %install
@@ -70,6 +70,11 @@ 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
@@ -96,7 +101,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