-%pre devel
-if [ -x %{_sysconfdir}/init.d/plc-devel ] ; then
- %{_sysconfdir}/init.d/plc-devel stop
-fi
-
-# 0 = install, 1 = upgrade
-if [ $1 -gt 0 ] ; then
- # Never overwrite /cvs
- if [ -d /plc/devel/data/cvs ] ; then
- echo "Preserving /plc/devel/data/cvs"
- mv /plc/devel/data/cvs /plc/devel/data/cvs.rpmsave
- fi
-fi
-
-%post devel
-if [ -x /sbin/chkconfig ] ; then
- /sbin/chkconfig --add plc-devel
- /sbin/chkconfig plc-devel on
-fi
-
-%triggerpostun -- %{name}
-# 0 = erase, 1 = upgrade
-if [ $1 -gt 0 ] ; then
- if [ -d /plc/devel/data/cvs.rpmsave ] ; then
- echo "Restoring /plc/devel/data/cvs"
- mv /plc/devel/data/cvs /plc/devel/data/cvs.%{version}-%{release}
- mv /plc/devel/data/cvs.rpmsave /plc/devel/data/cvs
- fi
-fi
-
-%preun devel
-# 0 = erase, 1 = upgrade
-if [ $1 -eq 0 ] ; then
- %{_sysconfdir}/init.d/plc-devel stop
- if [ -x /sbin/chkconfig ] ; then
- /sbin/chkconfig plc-devel off
- /sbin/chkconfig --del plc-devel
- fi
-fi
-