]> git.pld-linux.org Git - projects/template-specs.git/commitdiff
- update systemd scriptlets to use upstream macros and add user units
authorJan Rękorajski <baggins@pld-linux.org>
Fri, 7 Jan 2022 22:31:17 +0000 (23:31 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Fri, 7 Jan 2022 22:31:17 +0000 (23:31 +0100)
template.spec

index f90e1a57215fa81cd012ba1384718219d040f4bb..072220ea74d0d5d6f41df09d3daa32a6f26181a0 100644 (file)
@@ -26,10 +26,13 @@ Requires(post,preun):       /sbin/chkconfig
 Requires:      rc-scripts
 %endif
 %if %{with systemd_service}
-BuildRequires: rpmbuild(macros) >= 1.647
+BuildRequires: rpmbuild(macros) >= 2.011
 Requires(post,preun,postun):   systemd-units >= 38
 Requires:      systemd-units >= 0.38
 %endif
+%if %{with systemd_user_service}
+BuildRequires: rpmbuild(macros) >= 2.011
+%endif
 #BuildRequires:        -
 #BuildRequires:        autoconf
 #BuildRequires:        automake
@@ -190,7 +193,16 @@ fi
 %systemd_preun %{name}.service
 
 %postun
-%systemd_reload
+#%systemd_postun %{name}.service
+%systemd_postun_with_restart %{name}.service
+%endif
+
+%if %{with systemd_user_service}
+%post
+%systemd_user_post %{name}.service
+
+%preun
+%systemd_user_preun %{name}.service
 %endif
 
 %files
@@ -215,6 +227,10 @@ fi
 %{systemdunitdir}/%{name}.service
 %endif
 
+%if %{with systemd_user_service}
+%{systemduserunitdir}/%{name}.service
+%endif
+
 #%{_examplesdir}/%{name}-%{version}
 
 %if %{with subpackage}
This page took 0.647215 seconds and 4 git commands to generate.