Summary: Name: linuxconf-MODULENAME Version: PACKAGEREV Release: 1 Source: SOURCE URL: License: Group: linuxconf/modules BuildRoot: /tmp/rpm-MODULENAME-root requires: linuxconf requires: %(echo LINUXCONFAPIREV`grep "#define MODULE_API_VERSION" /usr/include/linuxconf/module.h | (read a b c; echo $c)`) %description %prep %setup %build make %install export RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/lib/linuxconf make install mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d install taskmon.sysv -m 755 $RPM_BUILD_ROOT/etc/rc.d/init.d/taskmon %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) /usr/lib/linuxconf /usr/sbin/* /usr/bin/* %config(noreplace) %verify(not md5 size mtime) /etc/monitortasks.conf %config(noreplace) %verify(not md5 size mtime) /etc/taskmon.conf %config /etc/rc.d/init.d/taskmon %post linuxconf --setmod MODULENAME if [ -f /sbin/chkconfig ] ; then /sbin/chkconfig taskmon on else (cd /etc/rc.d/rc5.d && ln -s ../init.d/taskmon S98taskmon ) (cd /etc/rc.d/rc3.d && ln -s ../init.d/taskmon S98taskmon ) fi echo Starting the task monitor now /etc/rc.d/init.d/taskmon start %pre if [ "$1" = 2 ] ; then echo Stopping the task monitor server now /etc/rc.d/init.d/taskmon stop fi %preun rm -f /etc/rc.d/*/S??taskmon /etc/rc.d/*/K??taskmon if [ "$1" = 0 ] ; then echo Stopping the task monitor now /etc/rc.d/init.d/taskmon stop fi %postun if [ "$1" = "0" ] ; then linuxconf --unsetmod MODULENAME fi