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
%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
%{systemdunitdir}/%{name}.service
%endif
+%if %{with systemd_user_service}
+%{systemduserunitdir}/%{name}.service
+%endif
+
#%{_examplesdir}/%{name}-%{version}
%if %{with subpackage}