%define fullname %{name}-%{version} %define version 1.28 %define release 5mdk %define name ffingerd Name: %{name} Summary: Secure finger daemon Version: %{version} Release: %{release} Source: %{fullname}.tar.bz2 Group: Networking/Other URL: http://www.fefe.de/ffingerd/ License: GPL BuildRoot: %{_tmppath}/%{name}-buildroot %description Fefe's Finger Daemon is a secure fingerd which doesn't run as root, doesn't give away vital info about your system, and does syslogging. %prep rm -rf $RPM_BUILD_ROOT %setup -q %{fullname} %build %configure %make %install install -d $RPM_BUILD_ROOT%{_prefix}/sbin install -d $RPM_BUILD_ROOT%{_mandir}/man8 install -m 644 ffingerd.8 $RPM_BUILD_ROOT/%{_mandir}/man8 install -m 755 ffingerd $RPM_BUILD_ROOT%{_sbindir}/ %post # remove other fingerd's and add ffingerd. make a backup, too cat /etc/inetd.conf | grep ffingerd > /tmp/ffingerd.test if [ ! -s /tmp/ffingerd.test ]; then cp -f /etc/inetd.conf /etc/inetd.conf.rpmsave cat /etc/inetd.conf | grep -v in.fingerd | grep -v "End of inetd.conf" > /etc/inetd.conf echo "#" >> /etc/inetd.conf echo "# Fefe's finger daemon, a secure finger daemon" >> /etc/inetd.conf echo "#" >> /etc/inetd.conf echo "finger stream tcp nowait nobody /usr/sbin/tcpd /usr/sbin/ffingerd" >> /etc/inetd.conf echo >> /etc/inetd.conf echo "# End of inetd.conf" >> /etc/inetd.conf fi rm /tmp/ffingerd.test # now restart inetd if [ -f /var/run/inetd.pid ]; then kill -HUP `cat /var/run/inetd.pid` ; else echo "Now you need to restart inetd" ; fi %postun # restore the old config file, or try to at least if [ -f /etc/inetd.conf.rpmsave ]; then mv /etc/inetd.conf.rpmsave /etc/inetd.conf ; fi # now restart inetd if [ -f /var/run/inetd.pid ]; then kill -HUP `cat /var/run/inetd.pid` ; else echo "Now you need to restart inetd" ; fi %files %defattr(-,root,root) %doc NEWS README TODO %{_sbindir}/* %{_mandir}/man8/* %clean rm -rf $RPM_BUILD_ROOT %changelog * Fri Feb 20 2004 Lenny Cartier <lenny@mandrakesoft.com> 1.28-5mdk - rebuild * Thu Jan 23 2003 Lenny Cartier <lenny@mandrakesoft.com> 1.28-4mdk - rebuild * Thu Aug 29 2002 Lenny Cartier <lenny@mandrakesoft.com> 1.28-3mdk - rebuild * Mon Jul 09 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.28-2mdk - rebuild * Tue Jan 09 2001 Lenny Cartier <lenny@mandrakesoft.com> 1.28-1mdk - updated to 1.28 * Wed Aug 30 2000 Lenny Cartier <lenny@mandrakesoft.com> 1.24-3mdk - BM * Wed Apr 26 2000 Lenny Cartier <lenny@mandrakesoft.com> 1.24-2mdk - fix group - spec helper fixes * Sun Jul 18 1999 Oden Eriksson <oden@kvikkjokk.com> [1.24] - Repacked for Linux Mandrake