Accepting request 138904 from 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. (forwarded request 138894 from benoit_monin)

OBS-URL: https://build.opensuse.org/request/show/138904
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/msmtp?expand=0&rev=25
This commit is contained in:
Stephan Kulow 2012-10-22 20:07:20 +00:00 committed by Git OBS Bridge
commit ae36c35b67
2 changed files with 33 additions and 1 deletions

View File

@ -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 Tue Jun 5 15:12:56 UTC 2012 - puzel@suse.com

View File

@ -78,12 +78,28 @@ the delivery. msmtp supports multiple accounts.
This subpackage contains the documentation for %{name}, including This subpackage contains the documentation for %{name}, including
examples and sample configuration files. 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 %prep
%setup -q %setup -q
%build %build
%if 0%{?suse_version} > 1000 %if 0%{?suse_version} > 1000
export CFLAGS="%{optflags} -fstack-protector" CFLAGS="%{optflags} -fstack-protector -fPIE"
export LDFLAGS="-pie"
%endif %endif
%configure --docdir="%{_docdir}/%{name}" --with-ssl=openssl %configure --docdir="%{_docdir}/%{name}" --with-ssl=openssl
make %{?_smp_mflags} V=1 make %{?_smp_mflags} V=1
@ -130,6 +146,11 @@ scripts/set_sendmail/set_sendmail.conf \
echo "%doc %{_docdir}/%{name}/$ff" >>docfiles.lst echo "%doc %{_docdir}/%{name}/$ff" >>docfiles.lst
done 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: # not properly ignored on Fedora 10:
rm -f "%{buildroot}%{_infodir}/dir" rm -f "%{buildroot}%{_infodir}/dir"
@ -171,4 +192,9 @@ rm -f "%{buildroot}%{_infodir}/dir"
%defattr (-, root, root) %defattr (-, root, root)
%doc %dir %{_docdir}/%{name} %doc %dir %{_docdir}/%{name}
%files mta
%defattr (-, root, root)
%{_sbindir}/sendmail
%{_mandir}/man1/sendmail.1%{ext_man}
%changelog %changelog