diff --git a/postfix.changes b/postfix.changes index 39631e9..794a769 100644 --- a/postfix.changes +++ b/postfix.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Feb 23 09:33:08 UTC 2013 - rmilasan@suse.com + +- Install postfix.service accordingly (/usr/lib/systemd for 12.3 + and up or /lib/systemd for older versions). + ------------------------------------------------------------------- Wed Feb 6 19:56:57 UTC 2013 - varkoly@suse.com diff --git a/postfix.spec b/postfix.spec index 1d4ff1e..ae7ed80 100644 --- a/postfix.spec +++ b/postfix.spec @@ -96,6 +96,12 @@ Provides: smtp_daemon # # --------------------------------------------------------------------------- +%if %suse_version > 1220 +%define _unitdir /usr/lib/systemd +%else +%define _unitdir /lib/systemd +%endif + %description Postfix aims to be an alternative to the widely-used sendmail program. @@ -296,9 +302,9 @@ cp -a examples/* $RPM_BUILD_ROOT%{pf_sample_directory} cp -a html/* $RPM_BUILD_ROOT%{pf_html_directory} cp -a auxiliary/ $RPM_BUILD_ROOT%{pf_docdir}/ %if 0%{?suse_version} >= 1140 -mkdir -p %{buildroot}/lib/systemd/system +mkdir -p %{buildroot}%{_unitdir}/system mkdir -p %{buildroot}/etc/postfix/system -install -m 0644 %{name}-SuSE/postfix.service %{buildroot}/lib/systemd/system/ +install -m 0644 %{name}-SuSE/postfix.service %{buildroot}%{_unitdir}/system/postfix.service install -m 0755 %{name}-SuSE/config_postfix.systemd %{buildroot}/etc/postfix/system/config_postfix install -m 0755 %{name}-SuSE/update_chroot.systemd %{buildroot}/etc/postfix/system/update_chroot install -m 0755 %{name}-SuSE/update_postmaps.systemd %{buildroot}/etc/postfix/system/update_postmaps @@ -477,7 +483,7 @@ rm -rf $RPM_BUILD_ROOT %if 0%{?suse_version} >= 1140 %dir /etc/postfix/system %config %attr(0755,root,root) /etc/postfix/system/* -%config /lib/systemd/system/postfix.service +%config %{_unitdir}/system/postfix.service %endif /usr/bin/mailq /usr/bin/newaliases