]> git.pld-linux.org Git - projects/template-specs.git/commitdiff
- added systemd service bits
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 20 Apr 2012 10:52:52 +0000 (10:52 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    template.spec -> 1.81

template.spec

index c6f25743d3e60c2e7bd001aff3651f837f58d09d..db64fd9b47addfaccf93f4bd05249436b132d3ec 100644 (file)
@@ -22,6 +22,11 @@ BuildRequires:       rpmbuild(macros) >= 1.228
 Requires(post,preun):  /sbin/chkconfig
 Requires:      rc-scripts
 %endif
+%if %{with systemd_service}
+BuildRequires: rpmbuild(macros) >= 1.647
+Requires(post,preun,postun):   systemd-units >= 38
+Requires:      systemd-units >= 0.38
+%endif
 #BuildRequires:        -
 #BuildRequires:        autoconf
 #BuildRequires:        automake
@@ -162,17 +167,28 @@ fi
 %endif
 
 %if %{with initscript}
-%post init
+%post
 /sbin/chkconfig --add %{name}
 %service %{name} restart
 
-%preun init
+%preun
 if [ "$1" = "0" ]; then
        %service -q %{name} stop
        /sbin/chkconfig --del %{name}
 fi
 %endif
 
+%if %{with systemd_service}
+%post
+%systemd_post %{name}.service
+
+%preun
+%systemd_preun %{name}.service
+
+%postun
+%systemd_reload
+%endif
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS CREDITS CHANGES ChangeLog NEWS README THANKS TODO
@@ -191,6 +207,10 @@ fi
 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
 %endif
 
+%if %{with systemd_service}
+%{systemdunitdir}/%{name}.service
+%endif
+
 #%{_examplesdir}/%{name}-%{version}
 
 %if %{with subpackage}
This page took 0.092366 seconds and 4 git commands to generate.