]> git.pld-linux.org Git - packages/autolog.git/blobdiff - autolog.spec
- orphaned, outdated
[packages/autolog.git] / autolog.spec
index cb993d120033ba9c244dc0a4503ef6c4a37619b5..57cddb41c7fd8bbe43d6031bb2efbeda39f82a74 100644 (file)
@@ -2,14 +2,15 @@ Summary:      Terminates connections for idle users
 Summary(pl):   Przerywa po³±czenia bezczynnych u¿ytkowników
 Name:          autolog
 Version:       0.40
-Release:       1
+Release:       3
 License:       GPL
 Group:         Daemons
-Group(de):     Server
-Group(pl):     Serwery
-Source0:       ftp://sunsite.unc.edu/pub/Linux/system/Admin/idle/%{name}-%{version}.tar.gz
-Source1:       autolog.init
-Prereq:                chkconfig
+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
@@ -22,7 +23,7 @@ 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
@@ -31,41 +32,40 @@ u
 # Remove stale binaries
 %{__make} clean
 
-%{__make} CFLAGS="%{rpmcflags}"
+%{__make} \
+       CC="%{__cc}" \
+       CFLAGS="%{rpmcflags}"
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man{5,8},%{_sysconfdir}/rc.d/init.d}
+install -d $RPM_BUILD_ROOT{%{_sbindir},%{_mandir}/man{5,8},/etc/rc.d/init.d,/var/log}
 
 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%{_sysconfdir}/rc.d/init.d/%{name}
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 
-gzip -9nf README CHANGES 
+touch $RPM_BUILD_ROOT/var/log/autolog.log
+
+%clean
+rm -rf $RPM_BUILD_ROOT
 
 %post
 /sbin/chkconfig --add autolog
-if [ ! -f /var/lock/subsys/crond ]; then
-       /etc/rc.d/init.d/autolog restart >&2
-else
-       echo "Run \"/etc/rc.d/init.d/autolog start\" to activate autolog."
-fi
+%service autolog restart
 
 %preun
-if [ ! -f /var/lock/subsys/autolog ]; then
-       /etc/rc.d/init.d/autolog stop >&2
+if [ "$1" = "0" ]; then
+       %service autolog stop
+       /sbin/chkconfig --del autolog
 fi
-/sbin/chkconfig --del autolog
-
-%clean
-rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc README.gz CHANGES.gz
+%doc README CHANGES
 %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}
+%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.125027 seconds and 4 git commands to generate.