From 73920046d9ef7f68328704bf6476f3203387d88b9ec08ba2febc571ee4a97265 Mon Sep 17 00:00:00 2001 From: Peter Varkoly Date: Mon, 25 Feb 2013 10:13:10 +0000 Subject: [PATCH] Accepting request 156173 from home:rmilasan:branches:server:mail - Install postfix.service accordingly (/usr/lib/systemd for 12.3 and up or /lib/systemd for older versions). OBS-URL: https://build.opensuse.org/request/show/156173 OBS-URL: https://build.opensuse.org/package/show/server:mail/postfix?expand=0&rev=162 --- postfix.changes | 6 ++++++ postfix.spec | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) 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