]> git.pld-linux.org Git - packages/autolog.git/blobdiff - autolog.spec
- adapterized.
[packages/autolog.git] / autolog.spec
index 2ea11550c737fae36641480ff3a1346aa6cd8902..abc8c0d56890b85a94736e37635a43e7a862aa57 100644 (file)
@@ -1,14 +1,13 @@
-Summary:       Terminates connections for idle users.
-Summary(pl):   Przerywa po³±czenia bezczynnych u¿ytkowników.
+Summary:       Terminates connections for idle users
+Summary(pl):   Przerywa po³±czenia bezczynnych u¿ytkowników
 Name:          autolog
-Version:       0.34
-Release:       3
+Version:       0.40
+Release:       1
 License:       GPL
 Group:         Daemons
-Group(pl):     Serwery
-Source0:       ftp://sunsite.unc.edu/pub/Linux/system/Admin/idle/%{name}-%{version}.tgz
-Patch0:                autolog-0.34.debian.diff
-Requires:      /etc/crontab.d
+Source0:       ftp://sunsite.unc.edu/pub/Linux/system/Admin/idle/%{name}-%{version}.tar.gz
+Source1:       %{name}.init
+Prereq:                /sbin/chkconfig
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -21,46 +20,52 @@ lines, etc.
 Autolog to program automatycznie wylogowuj±cy u¿ytkowników, którzy nie
 korzystaj± przez okre¶lony czas z terminala. Plik konfiguracyjny
 pozwala na okre¶lenie czasów oraz regu³ postêpowania dla ró¿nych
-u¿ytkowników, grup, lini tty itp.
+u¿ytkowników, grup, linii tty itp.
 
 %prep
 %setup -q
-%patch -p1
 
 %build
-%{__make} CFLAGS="$RPM_OPT_FLAGS"
+# Remove stale binaries
+%{__make} clean
+
+%{__make} CFLAGS="%{rpmcflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/{usr/sbin,usr/share/man/{man8,man5},etc/crontab.d}
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man{5,8},%{_sysconfdir}/rc.d/init.d}
 
 install autolog $RPM_BUILD_ROOT%{_sbindir}
-install crontab $RPM_BUILD_ROOT/etc/crontab.d/%{name}
-install autolog.8 $RPM_BUILD_ROOT%{_mandir}/man8
 install autolog.conf $RPM_BUILD_ROOT%{_sysconfdir}
-install autolog.conf.5 $RPM_BUILD_ROOT%{_mandir}/man5
+install autolog.8.gz $RPM_BUILD_ROOT%{_mandir}/man8
+install autolog.conf.5.gz $RPM_BUILD_ROOT%{_mandir}/man5
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
+
+gzip -9nf README CHANGES
 
-gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man*/* README 
+%clean
+rm -rf $RPM_BUILD_ROOT
 
 %post
-if test -r /var/run/crond.pid; then
-       /etc/rc.d/init.d/crond restart >&2
+/sbin/chkconfig --add autolog
+if [ -f /var/lock/subsys/autolog ]; then
+       /etc/rc.d/init.d/autolog restart >&2
 else
-       echo "Run \"/etc/rc.d/init.d/crond start\" to activate autolog."
+       echo "Run \"/etc/rc.d/init.d/autolog start\" to activate autolog."
 fi
 
-%postun
-if test -r /var/run/crond.pid; then
-       /etc/rc.d/init.d/crond restart >&2
+%preun
+if [ "$1" = "0" ]; then
+       if [ -f /var/lock/subsys/autolog ]; then
+               /etc/rc.d/init.d/autolog stop >&2
+       fi
+       /sbin/chkconfig --del autolog
 fi
 
-%clean
-rm -rf $RPM_BUILD_ROOT
-
 %files
 %defattr(644,root,root,755)
-%doc README.gz
-%attr(700,root,root) %{_sbindir}/autolog
-%attr(700,root,root) /etc/crontab.d/autolog
-%attr(600,root,root) %config(noreplace) %{_sysconfdir}/autolog.conf
-%{_mandir}/man8/*
+%doc README.gz CHANGES.gz
+%attr(755,root,root) %{_sbindir}/%{name}
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/autolog.conf
+%attr(754,root,root) %{_sysconfdir}/rc.d/init.d/%{name}
+%{_mandir}/man?/*
This page took 0.086467 seconds and 4 git commands to generate.