]> git.pld-linux.org Git - packages/autolog.git/blobdiff - autolog.spec
- orphaned, outdated
[packages/autolog.git] / autolog.spec
index 394f45b0694edd28fad70553d3a3c57c06c252c1..57cddb41c7fd8bbe43d6031bb2efbeda39f82a74 100644 (file)
@@ -1,77 +1,71 @@
-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:       2
-Copyright:     GPL
+Version:       0.40
+Release:       3
+License:       GPL
 Group:         Daemons
-Group(pl):     Serwery
-Source:                ftp://sunsite.unc.edu/pub/Linux/system/Admin/idle/%{name}-%{version}.tgz
-Patch:         autolog-0.34.debian.diff
-Requires:      /etc/crontab.d
-BuildRoot:     /tmp/%{name}-%{version}-root
+Source0:       ftp://sunsite.unc.edu/pub/Linux/system/admin/idle/%{name}-%{version}.tar.gz
+# Source0-md5: bcca87156acfdce9171acc90b35f9d0d
+Source1:       %{name}.init
+BuildRequires: rpmbuild(macros) >= 1.268
+Requires(post,preun):  /sbin/chkconfig
+Requires:      rc-scripts
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-Autolog is a program to automatically log off users who are idle for a specified
-amount of time. A configuration file allows you to specify different idle times
-and logout rules for different users, groups, tty lines, etc.
+Autolog is a program to automatically log off users who are idle for a
+specified amount of time. A configuration file allows you to specify
+different idle times and logout rules for different users, groups, tty
+lines, etc.
 
 %description -l pl
 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.
+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, linii tty itp.
 
 %prep
 %setup -q
-%patch -p1
 
 %build
-make CFLAGS="$RPM_OPT_FLAGS"
+# Remove stale binaries
+%{__make} clean
+
+%{__make} \
+       CC="%{__cc}" \
+       CFLAGS="%{rpmcflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/{usr/sbin,usr/man/{man8,man5},etc/crontab.d}
-
-install autolog $RPM_BUILD_ROOT/usr/sbin
-install crontab $RPM_BUILD_ROOT/etc/crontab.d/%{name}
-install autolog.8 $RPM_BUILD_ROOT/usr/man/man8
-install autolog.conf $RPM_BUILD_ROOT/etc
-install autolog.conf.5 $RPM_BUILD_ROOT/usr/man/man5
-
-gzip -9nf $RPM_BUILD_ROOT/usr/man/man*/* README 
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man{5,8},/etc/rc.d/init.d,/var/log}
 
-%post
-if test -r /var/run/crond.pid; then
-       /etc/rc.d/init.d/crond stop >&2
-       /etc/rc.d/init.d/crond start >&2
-else
-       echo "Run \"/etc/rc.d/init.d/crond start\" to activate autolog."
-fi
+install autolog $RPM_BUILD_ROOT%{_sbindir}
+install autolog.conf $RPM_BUILD_ROOT%{_sysconfdir}
+install autolog.8.gz $RPM_BUILD_ROOT%{_mandir}/man8
+install autolog.conf.5.gz $RPM_BUILD_ROOT%{_mandir}/man5
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 
-%postun
-if test -r /var/run/crond.pid; then
-       /etc/rc.d/init.d/crond stop >&2
-       /etc/rc.d/init.d/crond start >&2
-fi
+touch $RPM_BUILD_ROOT/var/log/autolog.log
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%files
-%defattr(644,root,root,755) 
-%doc README.gz
-%attr(700,root,root) /usr/sbin/autolog
-%attr(700,root,root) /etc/crontab.d/autolog
-%attr(600,root,root) %config(noreplace) /etc/autolog.conf
-/usr/man/man8/*
+%post
+/sbin/chkconfig --add autolog
+%service autolog restart
 
-%changelog
-* Tue Apr  6 1999 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
-  [0.34-2]
-- changed Group(pl),
-- added %post, %preun with restarting crond on install, upgrade and
-  uninstall autolog; this allow automated {de}activate autolog.
+%preun
+if [ "$1" = "0" ]; then
+       %service autolog stop
+       /sbin/chkconfig --del autolog
+fi
 
-* Fri Oct 16 1998 Arkadiusz Mi¶kiewicz <misiek@misiek.eu.org>
-- initial rpm release.
+%files
+%defattr(644,root,root,755)
+%doc README CHANGES
+%attr(755,root,root) %{_sbindir}/%{name}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/autolog.conf
+%attr(754,root,root) /etc/rc.d/init.d/%{name}
+%{_mandir}/man?/*
+%attr(640,root,root) %ghost /var/log/autolog.log
This page took 0.104079 seconds and 4 git commands to generate.