SPECS: pommed.spec - init script

shadzik shadzik at pld-linux.org
Thu Dec 20 19:05:27 CET 2007


Author: shadzik                      Date: Thu Dec 20 18:05:27 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- init script

---- Files affected:
SPECS:
   pommed.spec (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: SPECS/pommed.spec
diff -u SPECS/pommed.spec:1.4 SPECS/pommed.spec:1.5
--- SPECS/pommed.spec:1.4	Thu Dec 20 18:40:17 2007
+++ SPECS/pommed.spec	Thu Dec 20 19:05:22 2007
@@ -6,11 +6,12 @@
 Summary(pl.UTF-8):	pommed
 Name:		pommed
 Version:	1.14
-Release:	0.3
+Release:	0.4
 License:	GPL v2
 Group:		Applications
 Source0:	http://alioth.debian.org/frs/download.php/2223/%{name}-%{version}.tar.gz
 # Source0-md5:	1b54269bbadb6b43bd9e45566dd1b6ef
+Source1:	%{name}.init
 URL:		http://www.technologeek.org/projects/pommed/
 BuildRequires:	dbus-devel
 BuildRequires:	libconfuse-devel
@@ -61,11 +62,14 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_datadir}/%{name},%{_sysconfdir}}
+install -d $RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_datadir}/%{name},%{_sysconfdir}/dbus-1/system.d}
+install -d $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
 
 install pommed/pommed $RPM_BUILD_ROOT%{_sbindir}
 install pommed/data/* $RPM_BUILD_ROOT%{_datadir}/%{name}
 install pommed.conf.{mactel,pmac} $RPM_BUILD_ROOT%{_sysconfdir}
+install dbus-policy.conf $RPM_BUILD_ROOT%{_sysconfdir}/dbus-1/system.d/pommed.conf
+install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/pommed
 %if %{with gpomme}
 install -d $RPM_BUILD_ROOT{%{_datadir}/gpomme/themes,%{_desktopdir}}
 install gpomme/gpomme $RPM_BUILD_ROOT%{_bindir}
@@ -78,12 +82,24 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+/sbin/chkconfig --add %{name}
+%service pommed restart
+
+%preun
+if [ "$1" = "0" ]; then
+%service pommed stop
+/sbin/chkconfig --del %{name}
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS README TODO
 %attr(755,root,root) %{_sbindir}/pommed
 %{_datadir}/%{name}
 %{_sysconfdir}/pommed.conf.*
+%{_sysconfdir}/dbus-1/system.d/pommed.conf
+%attr(754,root,root) %{_sysconfdir}/rc.d/init.d/pommed
 
 %if %{with gpomme}
 %files -n gpomme
@@ -103,6 +119,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.5  2007-12-20 18:05:22  shadzik
+- init script
+
 Revision 1.4  2007-12-20 17:40:17  shadzik
 - easy stuff: gpomme files
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/pommed.spec?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list