Summary: RC5DES customized for wstearns@pobox.com Name: rc5des Version: 2.8010.463 Release: 4 Source: dnetc-linux-x86-elf.tar.gz Source1: rc5des.ini Copyright: Probably by the guys that wrote it. Group: Applications BuildRoot: /tmp/rc5des-broot %description RC5des client, customized for wstearns@pobox.com %prep %setup -c %install if [ "$RPM_BUILD_ROOT" = "/tmp/rc5des-broot" ]; then rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT/root install -d $RPM_BUILD_ROOT/usr/bin install -d $RPM_BUILD_ROOT/usr/man/man1 cp -p dnetc $RPM_BUILD_ROOT/usr/bin/rc5des cp -p dnetc.1 $RPM_BUILD_ROOT/usr/man/man1 cp -p dnetc.1 $RPM_BUILD_ROOT/usr/man/man1/rc5des.1 cp -p $RPM_SOURCE_DIR/rc5des.ini $RPM_BUILD_ROOT/root cd $RPM_BUILD_ROOT/usr/bin ln -sf ../../root/rc5des.ini else echo Invalid Build root exit 1 fi %clean if [ "$RPM_BUILD_ROOT" = "/tmp/rc5des-broot" ]; then rm -rf $RPM_BUILD_ROOT else echo Invalid Build root exit 1 fi %files %doc docs/* /root/rc5des.ini /usr/bin/rc5des /usr/bin/rc5des.ini /usr/man/man1/dnetc.1.gz /usr/man/man1/rc5des.1.gz %post if [ `cat /etc/rc.d/rc.local 2>/dev/null | grep rc5desinst | wc -l` -eq 0 ]; then cat <>/etc/rc.d/rc.local cd /root #rc5desinst /usr/bin/nohup /usr/bin/rc5des -ini /root/rc5des.ini >>/root/nohup.out & #rc5desinst EOTEXT1 fi if [ `cat /var/spool/cron/root 2>/dev/null | grep rc5desinst | wc -l` -eq 0 ]; then cat <>//var/spool/cron/root 12 * * * * /usr/bin/rc5des -ini /root/rc5des.ini -update >>/root/autorc5update.log 2>&1 #rc5desinst EOTEXT2 fi if ps ax | grep -v grep 2>/dev/null | grep -q rc5des 2>/dev/null ; then /usr/bin/rc5des -ini /root/rc5des.ini -forceflush /usr/bin/rc5des -ini /root/rc5des.ini -forceflush killall -9 /usr/bin/rc5des fi cd /root /usr/bin/nohup /usr/bin/rc5des -ini /root/rc5des.ini >>/root/nohup.out & %preun if [ "$1" = "0" ]; then #This is being completely erased, not upgraded if ps ax | grep -v grep 2>/dev/null | grep -q rc5des 2>/dev/null ; then /usr/bin/rc5des -ini /root/rc5des.ini -forceflush /usr/bin/rc5des -ini /root/rc5des.ini -forceflush killall -9 rc5des fi fi %postun if [ "$1" = "0" ]; then #This is being completely erased, not upgraded cat /etc/rc.d/rc.local | grep -v rc5desinst >/etc/rc.d/rc.local.tmp cat /etc/rc.d/rc.local.tmp >/etc/rc.d/rc.local rm -f /etc/rc.d/rc.local.tmp cat /var/spool/cron/root | grep -v rc5desinst >/var/spool/cron/root.tmp cat /var/spool/cron/root.tmp >/var/spool/cron/root rm -f /var/spool/cron/root.tmp fi