SPECS: PolicyKit.spec - added init

patrys patrys at pld-linux.org
Tue Dec 5 22:25:38 CET 2006


Author: patrys                       Date: Tue Dec  5 21:25:38 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added init

---- Files affected:
SPECS:
   PolicyKit.spec (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SPECS/PolicyKit.spec
diff -u SPECS/PolicyKit.spec:1.2 SPECS/PolicyKit.spec:1.3
--- SPECS/PolicyKit.spec:1.2	Tue Dec  5 21:02:43 2006
+++ SPECS/PolicyKit.spec	Tue Dec  5 22:25:33 2006
@@ -1,16 +1,15 @@
 # $Revision$, $Date$
-# TODO:
-# - add init scripts
 %define	snap	20061203
 Summary:	A framework for defining policy for system-wide components
 Summary(pl):	Szkielet do definiowania polityki dla komponentów systemowych
 Name:		PolicyKit
 Version:	0.1
-Release:	0.%{snap}.1
+Release:	0.%{snap}.2
 License:	GPL
 Group:		Libraries
 Source0:	%{name}-%{snap}.tar.gz
 # Source0-md5:	3eca471796753a36ee46495907d41525
+Source1:	%{name}.init
 URL:		http://webcvs.freedesktop.org/hal/
 BuildRequires:	autoconf
 BuildRequires:	automake
@@ -20,6 +19,7 @@
 BuildRequires:	libtool
 BuildRequires:	pam-devel >= 0.80
 BuildRequires:	xmlto
+Requires(post,preun):	/sbin/chkconfig
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -70,11 +70,23 @@
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-install -d $RPM_BUILD_ROOT%{_var}/run/polkit-console
+install -d $RPM_BUILD_ROOT{%{_var}/run/polkit-console,/etc/rc.d/init.d}
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/PolicyKit
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+/sbin/chkconfig --add PolicyKit
+%service PolicyKit restart
+
+%preun
+if [ "$1" = "0" ]; then
+	%service -q PolicyKit stop
+	/sbin/chkconfig --del PolicyKit
+fi
+
+%
 %post	-p /sbin/ldconfig
 %postun	-p /sbin/ldconfig
 
@@ -90,6 +102,7 @@
 %{_sysconfdir}/dbus-1/system.d/PolicyKit.conf
 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/policy-kit
 %dir %{_var}/run/polkit-console
+%attr(754,root,root) /etc/rc.d/init.d/*
 
 %files devel
 %defattr(644,root,root,755)
@@ -108,6 +121,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2006/12/05 21:25:33  patrys
+- added init
+
 Revision 1.2  2006/12/05 20:02:43  qboosh
 - pl, unified
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/PolicyKit.spec?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list