From d926cf2b7c8e49e6091801960e07f6ac2cda94bb865fbc77ab288ef93ea22a32 Mon Sep 17 00:00:00 2001 From: Christian Wittmer Date: Sat, 20 Oct 2012 19:54:11 +0000 Subject: [PATCH] Accepting request 138894 from home:benoit_monin:branches:server:mail - create a -mta subpackage, providing smtp_daemon via a symlink to sendmail. - build msmtp with -fPIE/pie, to pass sendmail packaging check. This is the following of request 138545. Its my first package with OBS, I hope it's ok this time. OBS-URL: https://build.opensuse.org/request/show/138894 OBS-URL: https://build.opensuse.org/package/show/server:mail/msmtp?expand=0&rev=54 --- msmtp.changes | 6 ++++++ msmtp.spec | 28 +++++++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/msmtp.changes b/msmtp.changes index 0449e40..5484c15 100644 --- a/msmtp.changes +++ b/msmtp.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sat Oct 20 15:37:38 UTC 2012 - benoit.monin@gmx.fr + +- create a -mta subpackage, providing smtp_daemon. +- build msmtp with -fPIE/pie. + ------------------------------------------------------------------- Tue Jun 5 15:12:56 UTC 2012 - puzel@suse.com diff --git a/msmtp.spec b/msmtp.spec index 77ba59d..c1fab39 100644 --- a/msmtp.spec +++ b/msmtp.spec @@ -78,12 +78,28 @@ the delivery. msmtp supports multiple accounts. This subpackage contains the documentation for %{name}, including examples and sample configuration files. +%package mta +Summary: MTA based on %{name} +Group: Productivity/Networking/Email/Servers +Requires: %{name} = %{version} +Conflicts: sendmail sendmail-tls postfix exim +Provides: smtp_daemon + +%description mta +msmtp is an SMTP client that can be used as a plug-in for Mutt and +other mail user agents. It forwards mail to an SMTP server that does +the delivery. msmtp supports multiple accounts. + +This subpackage provides a mail transfer agent that can be used as +a minimalistic replacement of sendmail. + %prep %setup -q %build %if 0%{?suse_version} > 1000 -export CFLAGS="%{optflags} -fstack-protector" +CFLAGS="%{optflags} -fstack-protector -fPIE" +export LDFLAGS="-pie" %endif %configure --docdir="%{_docdir}/%{name}" --with-ssl=openssl make %{?_smp_mflags} V=1 @@ -130,6 +146,11 @@ scripts/set_sendmail/set_sendmail.conf \ echo "%doc %{_docdir}/%{name}/$ff" >>docfiles.lst done +# mta files +install -d %{buildroot}%{_sbindir} +ln -s %{_bindir}/msmtp %{buildroot}%{_sbindir}/sendmail +ln -s %{_mandir}/man1/msmtp.1%{ext_man} %{buildroot}%{_mandir}/man1/sendmail.1%{ext_man} + # not properly ignored on Fedora 10: rm -f "%{buildroot}%{_infodir}/dir" @@ -171,4 +192,9 @@ rm -f "%{buildroot}%{_infodir}/dir" %defattr (-, root, root) %doc %dir %{_docdir}/%{name} +%files mta +%defattr (-, root, root) +%{_sbindir}/sendmail +%{_mandir}/man1/sendmail.1%{ext_man} + %changelog