diff --git a/postfix.changes b/postfix.changes index 00ec54a..5aceca2 100644 --- a/postfix.changes +++ b/postfix.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Nov 3 15:56:23 UTC 2011 - varkoly@suse.com + +- Use the systemd macros in the spec file + ------------------------------------------------------------------- Fri Oct 14 16:43:02 CEST 2011 - mhrusecky@suse.cz diff --git a/postfix.spec b/postfix.spec index eac1158..f9d7baf 100644 --- a/postfix.spec +++ b/postfix.spec @@ -57,6 +57,11 @@ BuildRequires: pwdutils %if 0%{?suse_version} >= 1100 BuildRequires: fdupes %endif +%if 0%{?suse_version} > 1140 +BuildRequires: systemd +%{?systemd_requires} +%endif + # Conflicts: sendmail exim Provides: smtp_daemon @@ -309,6 +314,10 @@ install -m 0755 %{name}-SuSE/cond_slp.systemd %{buildroot}/etc/postfix/syst install -m 755 %{SOURCE11} $RPM_BUILD_ROOT/usr/sbin/ %pre +%if %suse_version > 1140 +%service_add_pre %{name}.service +%endif + VERSIONTEST=$(test -x usr/sbin/postconf && usr/sbin/postconf proxy_read_maps 2>/dev/null) if [ -z "$VERSIONTEST" -a -f %{pf_queue_directory}/pid/master.pid ]; then if checkproc -p %{pf_queue_directory}/pid/master.pid usr/lib/%{name}/master; then @@ -339,6 +348,9 @@ fi %preun %stop_on_removal %{name} +%if %suse_version > 1140 +%service_del_preun %{name}.service +%endif # --------------------------------------------------------------------------- %preun mysql @@ -396,6 +408,9 @@ fi %{_sysconfdir}/sysconfig/%{name} %{fillup_and_insserv -y postfix} %{fillup_only -an mail} +%if %suse_version > 1140 +%service_add_post %{name}.service +%endif /sbin/ldconfig # --------------------------------------------------------------------------- @@ -403,6 +418,10 @@ fi %restart_on_update %{name} %insserv_cleanup /sbin/ldconfig +%if %suse_version > 1140 +%service_del_postun %{name}.service +%endif + # --------------------------------------------------------------------------- %post postgresql