commit efee52edc9ac6cd7b10629dca76064fbcf0c187c
Author: Jan Rękorajski <[email protected]>
Date: Fri Jan 7 23:31:17 2022 +0100
- update systemd scriptlets to use upstream macros and add user units
template.spec | 20 ++++++++++++++++++--
1 file changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/template.spec b/template.spec
index f90e1a5..072220e 100644
--- a/template.spec
+++ b/template.spec
@@ -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}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/projects/template-specs.git/commitdiff/efee52edc9ac6cd7b10629dca76064fbcf0c187c
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit