2007-01-16 00:25:53 +01:00
|
|
|
#
|
2011-09-20 17:59:01 +02:00
|
|
|
# spec file for package msmtp
|
2007-01-16 00:25:53 +01:00
|
|
|
#
|
2015-05-26 10:02:20 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2007-01-16 00:25:53 +01:00
|
|
|
#
|
2008-09-08 01:34:13 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2007-01-16 00:25:53 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2012-06-05 17:14:58 +02:00
|
|
|
|
2013-11-20 23:22:34 +01:00
|
|
|
%bcond_with gnome_keyring
|
2008-04-07 12:15:51 +02:00
|
|
|
|
2007-01-16 00:25:53 +01:00
|
|
|
Name: msmtp
|
2015-05-26 10:02:20 +02:00
|
|
|
Version: 1.6.2
|
2012-06-05 17:14:58 +02:00
|
|
|
Release: 0
|
2011-09-20 17:59:01 +02:00
|
|
|
BuildRequires: libidn-devel
|
|
|
|
BuildRequires: openssl-devel
|
|
|
|
BuildRequires: pkg-config
|
2015-01-14 10:14:38 +01:00
|
|
|
BuildRequires: xz
|
2013-11-20 23:22:34 +01:00
|
|
|
%if %{with gnome_keyring}
|
2015-01-14 10:14:38 +01:00
|
|
|
BuildRequires: pkgconfig(libsecret-1)
|
2012-01-10 12:14:05 +01:00
|
|
|
%endif
|
2010-04-16 01:06:41 +02:00
|
|
|
%if 0%{?suse_version} >= 1120
|
|
|
|
BuildRequires: libgsasl-devel
|
|
|
|
%endif
|
2010-03-19 10:15:11 +01:00
|
|
|
# for the directory
|
2010-04-16 01:06:41 +02:00
|
|
|
%if 0%{?centos_version}
|
|
|
|
BuildRequires: vim-common
|
2013-04-19 14:47:15 +02:00
|
|
|
%requires_eq vim-common
|
2010-04-16 01:06:41 +02:00
|
|
|
%else
|
|
|
|
%if 0%{?suse_version} < 1030
|
|
|
|
# old openSUSE and SLES and Fedora and RHEL:
|
|
|
|
BuildRequires: vim
|
2013-04-19 14:47:15 +02:00
|
|
|
%requires_eq vim
|
2010-04-16 01:06:41 +02:00
|
|
|
%else
|
|
|
|
# recent openSUSE:
|
|
|
|
BuildRequires: vim-base
|
2013-04-19 14:47:15 +02:00
|
|
|
%requires_eq vim-base
|
2010-04-16 01:06:41 +02:00
|
|
|
%endif #suse_version
|
|
|
|
%endif #centos_version
|
2007-01-16 00:25:53 +01:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
PreReq: %install_info_prereq
|
|
|
|
%endif
|
2010-04-16 01:06:41 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
|
|
|
|
Requires(post): /sbin/install-info
|
|
|
|
Requires(preun):/sbin/install-info
|
|
|
|
%endif
|
2011-01-14 17:01:21 +01:00
|
|
|
#Patch0: msmtp-fix-newopenssl.patch
|
2010-04-16 01:06:41 +02:00
|
|
|
Summary: Lightweight SMTP Client
|
2012-06-05 17:14:58 +02:00
|
|
|
License: GPL-3.0+
|
|
|
|
Group: Productivity/Networking/Email/Utilities
|
2011-09-20 17:59:01 +02:00
|
|
|
Url: http://msmtp.sourceforge.net/
|
2015-01-14 10:14:38 +01:00
|
|
|
Source: http://prdownloads.sourceforge.net/msmtp/msmtp-%{version}.tar.xz
|
2015-05-26 10:02:20 +02:00
|
|
|
Source1: http://prdownloads.sourceforge.net/msmtp/msmtp-%{version}.tar.xz.sig
|
|
|
|
Source2: %{name}.keyring
|
2011-09-20 17:59:01 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2007-01-16 00:25:53 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
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.
|
|
|
|
|
2010-04-16 01:06:41 +02:00
|
|
|
%package doc
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
Group: Documentation/Other
|
|
|
|
Requires: %{name} = %{version}
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
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 contains the documentation for %{name}, including
|
|
|
|
examples and sample configuration files.
|
|
|
|
|
2012-10-20 21:54:11 +02:00
|
|
|
%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.
|
|
|
|
|
2007-01-16 00:25:53 +01:00
|
|
|
%prep
|
2007-08-05 11:52:28 +02:00
|
|
|
%setup -q
|
2007-01-16 00:25:53 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%if 0%{?suse_version} > 1000
|
2012-10-20 21:54:11 +02:00
|
|
|
CFLAGS="%{optflags} -fstack-protector -fPIE"
|
|
|
|
export LDFLAGS="-pie"
|
2007-01-16 00:25:53 +01:00
|
|
|
%endif
|
2010-04-16 01:06:41 +02:00
|
|
|
%configure --docdir="%{_docdir}/%{name}" --with-ssl=openssl
|
2012-01-10 12:14:05 +01:00
|
|
|
make %{?_smp_mflags} V=1
|
2007-01-16 00:25:53 +01:00
|
|
|
|
|
|
|
%install
|
2012-01-10 12:14:05 +01:00
|
|
|
%makeinstall V=1
|
2007-01-16 00:25:53 +01:00
|
|
|
%find_lang %{name}
|
|
|
|
for i in README ChangeLog ; do
|
2011-09-20 17:59:01 +02:00
|
|
|
cp scripts/msmtpqueue/$i ${i}.msmtpqueue
|
2007-01-16 00:25:53 +01:00
|
|
|
done
|
2012-01-10 12:14:05 +01:00
|
|
|
cp scripts/msmtpq/README.msmtpq README.msmtpq
|
|
|
|
cp scripts/vim/README README.vim
|
|
|
|
|
2011-09-20 17:59:01 +02:00
|
|
|
install -m 0755 \
|
2008-09-08 01:34:13 +02:00
|
|
|
scripts/msmtpqueue/*.sh \
|
2012-01-10 12:14:05 +01:00
|
|
|
scripts/msmtpq/msmtpq \
|
|
|
|
scripts/msmtpq/msmtp-queue \
|
2010-03-19 10:15:11 +01:00
|
|
|
scripts/set_sendmail/*.sh \
|
|
|
|
scripts/find_alias/*.sh \
|
2007-08-05 11:52:28 +02:00
|
|
|
%{buildroot}%{_bindir}
|
2013-04-19 12:58:14 +02:00
|
|
|
|
2014-01-30 18:12:55 +01:00
|
|
|
# find where to install vim syntax
|
|
|
|
# start with the "site" directory, then "current" and finally any "vim??"
|
|
|
|
for vimsyntax in %{_datadir}/vim/{site,current,vim[0-9][0-9]}/syntax; do
|
|
|
|
if [ -d $vimsyntax ]; then
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
install -D -m 0644 scripts/vim/msmtp.vim %{buildroot}$vimsyntax/msmtp.vim
|
2007-01-16 00:25:53 +01:00
|
|
|
|
2010-04-16 01:06:41 +02:00
|
|
|
# main package doc files
|
|
|
|
for f in \
|
|
|
|
COPYING\
|
|
|
|
; do
|
2011-09-20 17:59:01 +02:00
|
|
|
install -D -m0644 "$f" "%{buildroot}%{_docdir}/%{name}/$f"
|
2010-04-16 01:06:41 +02:00
|
|
|
done
|
|
|
|
|
|
|
|
# doc files
|
|
|
|
echo -n >docfiles.lst
|
|
|
|
for f in \
|
|
|
|
AUTHORS ChangeLog* NEWS README README.msmtpqueue README.msmtpq THANKS \
|
2015-01-14 10:14:38 +01:00
|
|
|
doc/*.example \
|
2010-04-16 01:06:41 +02:00
|
|
|
scripts/set_sendmail/set_sendmail.conf \
|
|
|
|
; do
|
|
|
|
ff="${f##*/}"
|
2011-09-20 17:59:01 +02:00
|
|
|
install -D -m0644 "$f" "%{buildroot}%{_docdir}/%{name}/$ff"
|
2010-04-16 01:06:41 +02:00
|
|
|
echo "%doc %{_docdir}/%{name}/$ff" >>docfiles.lst
|
|
|
|
done
|
|
|
|
|
2012-10-20 21:54:11 +02:00
|
|
|
# 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}
|
|
|
|
|
2010-04-16 01:06:41 +02:00
|
|
|
# not properly ignored on Fedora 10:
|
2011-09-20 17:59:01 +02:00
|
|
|
rm -f "%{buildroot}%{_infodir}/dir"
|
2010-04-16 01:06:41 +02:00
|
|
|
|
2007-01-16 00:25:53 +01:00
|
|
|
%if 0%{?suse_version}
|
|
|
|
|
|
|
|
%post
|
2010-04-16 01:06:41 +02:00
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/msmtp.info%{ext_info}
|
2007-01-16 00:25:53 +01:00
|
|
|
|
|
|
|
%postun
|
2010-04-16 01:06:41 +02:00
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/msmtp.info%{ext_info}
|
2007-01-16 00:25:53 +01:00
|
|
|
%endif
|
2010-04-16 01:06:41 +02:00
|
|
|
%if 0%{?fedora} || 0%{?rhel_version} || 0%{?centos_version}
|
|
|
|
|
|
|
|
%post
|
|
|
|
[ "$1" = "1" ] && /sbin/install-info "%{_infodir}/%{name}.info%{ext_info}" || :
|
|
|
|
|
|
|
|
%preun
|
|
|
|
[ "$1" = "0" ] && /sbin/install-info --delete "%{_infodir}/%{name}.info%{ext_info}" || :
|
|
|
|
%endif # fedora
|
2007-01-16 00:25:53 +01:00
|
|
|
|
|
|
|
%files -f %{name}.lang
|
|
|
|
%defattr (-, root, root)
|
2010-04-16 01:06:41 +02:00
|
|
|
%doc %dir %{_docdir}/%{name}
|
|
|
|
%doc %{_docdir}/%{name}/COPYING
|
2007-01-16 00:25:53 +01:00
|
|
|
%{_bindir}/msmtp
|
2008-09-08 01:34:13 +02:00
|
|
|
%{_bindir}/msmtpq
|
2012-01-10 12:14:05 +01:00
|
|
|
%{_bindir}/msmtp-queue
|
2007-01-16 00:25:53 +01:00
|
|
|
%{_bindir}/msmtp-enqueue.sh
|
|
|
|
%{_bindir}/msmtp-runqueue.sh
|
2007-08-05 11:52:28 +02:00
|
|
|
%{_bindir}/msmtp-listqueue.sh
|
|
|
|
%{_bindir}/set_sendmail.sh
|
2010-03-19 10:15:11 +01:00
|
|
|
%{_bindir}/find_alias_for_msmtp.sh
|
2010-04-16 01:06:41 +02:00
|
|
|
%{_mandir}/man1/msmtp.1%{ext_man}
|
|
|
|
%{_infodir}/msmtp.info%{ext_info}
|
2013-04-19 12:58:14 +02:00
|
|
|
%{_datadir}/vim/*/syntax/msmtp.vim
|
2007-01-16 00:25:53 +01:00
|
|
|
|
2010-04-16 01:06:41 +02:00
|
|
|
%files doc -f docfiles.lst
|
|
|
|
%defattr (-, root, root)
|
|
|
|
%doc %dir %{_docdir}/%{name}
|
|
|
|
|
2012-10-20 21:54:11 +02:00
|
|
|
%files mta
|
|
|
|
%defattr (-, root, root)
|
|
|
|
%{_sbindir}/sendmail
|
|
|
|
%{_mandir}/man1/sendmail.1%{ext_man}
|
|
|
|
|
2007-06-17 12:10:50 +02:00
|
|
|
%changelog
|