]> git.pld-linux.org Git - packages/tenshi.git/commitdiff
- add tenshi user/group auto/ac/tenshi-0_5_1-1
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 30 Aug 2006 13:29:19 +0000 (13:29 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- private pid dir
- updated URL and Source0

Changed files:
    tenshi.spec -> 1.12

tenshi.spec

index b0fa037e21636ed95df9fc715c6d74baaac6a1c5..87b481c8e0318cf84f5961d8d0fe0dbbbccb4ee2 100644 (file)
@@ -6,19 +6,27 @@ Version:      0.5.1
 Release:       1
 License:       ISC
 Group:         Applications/System
-Source0:       http://dev.gentoo.org/~lcars/tenshi/%{name}-%{version}.tar.gz
+Source0:       http://dev.inversepath.com/tenshi/%{name}-%{version}.tar.gz
 # Source0-md5: 44361d5d8defc5170146f467a8825413
 Source1:       %{name}.init
 Patch0:                %{name}-root.patch
-URL:           http://www.gentoo.org/proj/en/infrastructure/tenshi/index.xml
-BuildRequires: rpmbuild(macros) >= 1.228
+URL:           http://dev.inversepath.com/trac/tenshi
 BuildRequires: rpm-perlprov
-Requires(post,preun):  rc-scripts
+BuildRequires: rpmbuild(macros) >= 1.228
 Requires(post,preun):  /sbin/chkconfig
+Requires(post,preun):  rc-scripts
+Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
+Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
 Obsoletes:     wasabi
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define                _sysconfdir     /etc/tenshi
+
 %description
 Tenshi is a log monitoring program, designed to watch one or more log
 files for lines matching user defined regular expressions and report
@@ -56,17 +64,20 @@ wiadomo
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_mandir}/man8,/etc/rc.d/init.d}
+install -d $RPM_BUILD_ROOT{%{_mandir}/man8,/var/run/tenshi}
 
 %{__make} install \
        DESTDIR=$RPM_BUILD_ROOT
 
-install %{name}.8 $RPM_BUILD_ROOT%{_mandir}/man8
-install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
+install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+%groupadd -g 175 %{name}
+%useradd -u 175 -d %{_sysconfdir} -g %{name} -c "Tenshi User" %{name}
+
 %post
 /sbin/chkconfig --add %{name}
 %service %{name} restart
@@ -77,11 +88,18 @@ if [ "$1" = "0" ]; then
        /sbin/chkconfig --del %{name}
 fi
 
+%postun
+if [ "$1" = "0" ]; then
+       %userremove %{name}
+       %groupremove %{name}
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc CREDITS Changelog README
 %attr(755,root,root) %{_sbindir}/*
-%attr(750,root,root) %dir %{_sysconfdir}/%{name}
-%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/%{name}.conf
+%attr(750,root,tenshi) %dir %{_sysconfdir}
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
 %{_mandir}/man8/*
+%dir %attr(775,root,tenshi) /var/run/tenshi
This page took 0.0322789999999999 seconds and 4 git commands to generate.