Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-mta/msmtp/
Date: Mon, 17 Feb 2020 09:01:36
Message-Id: 1581930087.b784f23b3124f3f4100c283c9dd11fab081bf3e2.polynomial-c@gentoo
1 commit: b784f23b3124f3f4100c283c9dd11fab081bf3e2
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Feb 17 08:50:30 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 17 09:01:27 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b784f23b
7
8 mail-mta/msmtp: Revbump to move "sendmail" symlink to /usr/sbin
9
10 Thanks-to: Stefan Strogin <steils <AT> gentoo.org>
11 Package-Manager: Portage-2.3.89, Repoman-2.3.20
12 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
13
14 mail-mta/msmtp/msmtp-1.8.7-r1.ebuild | 145 +++++++++++++++++++++++++++++++++++
15 1 file changed, 145 insertions(+)
16
17 diff --git a/mail-mta/msmtp/msmtp-1.8.7-r1.ebuild b/mail-mta/msmtp/msmtp-1.8.7-r1.ebuild
18 new file mode 100644
19 index 00000000000..9c112ec7abd
20 --- /dev/null
21 +++ b/mail-mta/msmtp/msmtp-1.8.7-r1.ebuild
22 @@ -0,0 +1,145 @@
23 +# Copyright 2004-2020 Gentoo Authors
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +EAPI=7
27 +
28 +inherit fcaps multilib
29 +
30 +DESCRIPTION="An SMTP client and SMTP plugin for mail user agents such as Mutt"
31 +HOMEPAGE="https://marlam.de/msmtp/"
32 +SRC_URI="https://marlam.de/msmtp/releases/${P}.tar.xz"
33 +
34 +LICENSE="GPL-3"
35 +SLOT="0"
36 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
37 +IUSE="daemon doc gnome-keyring idn +mta nls sasl ssl vim-syntax"
38 +
39 +# fcaps.eclass unconditionally defines "filecaps" USE flag which we need for
40 +# USE="daemon" in order to set the caps we need.
41 +REQUIRED_USE="daemon? ( filecaps )"
42 +
43 +# Upstream discourages usage of openssl. See also
44 +# https://marlam.de/msmtp/news/openssl-discouraged/
45 +DEPEND="
46 + gnome-keyring? ( app-crypt/libsecret )
47 + nls? ( virtual/libintl )
48 + sasl? ( virtual/gsasl )
49 + ssl? ( net-libs/gnutls[idn?] )
50 + !ssl? ( idn? ( net-dns/libidn2:= ) )
51 +"
52 +
53 +RDEPEND="${DEPEND}
54 + net-mail/mailbase
55 + daemon? (
56 + acct-group/msmtpd
57 + acct-user/msmtpd
58 + )
59 + mta? (
60 + !mail-mta/courier
61 + !mail-mta/esmtp
62 + !mail-mta/exim
63 + !mail-mta/mini-qmail
64 + !mail-mta/netqmail
65 + !mail-mta/nullmailer
66 + !mail-mta/postfix
67 + !mail-mta/qmail-ldap
68 + !mail-mta/sendmail
69 + !mail-mta/opensmtpd
70 + !<mail-mta/ssmtp-2.64-r2
71 + !>=mail-mta/ssmtp-2.64-r2[mta]
72 + )
73 +"
74 +
75 +BDEPEND="
76 + doc? ( virtual/texi2dvi )
77 + nls? ( sys-devel/gettext )
78 + virtual/pkgconfig
79 +"
80 +
81 +DOCS="AUTHORS ChangeLog NEWS README THANKS doc/msmtprc*"
82 +
83 +src_prepare() {
84 + # Use default Gentoo location for mail aliases
85 + sed 's:/etc/aliases:/etc/mail/aliases:' \
86 + -i scripts/find_alias/find_alias_for_msmtp.sh || die
87 +
88 + default
89 +}
90 +
91 +src_configure() {
92 + local myeconfargs=(
93 + --disable-gai-idn
94 + $(use_enable nls)
95 + $(use_with daemon msmtpd)
96 + $(use_with gnome-keyring libsecret)
97 + $(use_with idn libidn)
98 + $(use_with sasl libgsasl)
99 + $(use_with ssl tls gnutls)
100 + )
101 + econf "${myeconfargs[@]}"
102 +}
103 +
104 +src_compile() {
105 + default
106 +
107 + if use doc ; then
108 + cd doc || die
109 + emake html pdf
110 + fi
111 +}
112 +
113 +src_install() {
114 + default
115 +
116 + if use daemon ; then
117 + fcaps CAP_NET_BIND_SERVICE usr/bin/msmtpd
118 + newinitd "${FILESDIR}"/msmtpd.init msmtpd
119 + newconfd "${FILESDIR}"/msmtpd.confd msmtpd
120 + fi
121 +
122 + if use doc ; then
123 + dodoc doc/msmtp.{html,pdf}
124 + fi
125 +
126 + if use mta ; then
127 + dosym ../bin/msmtp /usr/sbin/sendmail
128 + dosym ../bin/msmtp /usr/$(get_libdir)/sendmail
129 + fi
130 +
131 + if use vim-syntax ; then
132 + insinto /usr/share/vim/vimfiles/syntax
133 + doins scripts/vim/msmtp.vim
134 + fi
135 +
136 + insinto /etc
137 + newins doc/msmtprc-system.example msmtprc
138 +
139 + src_install_contrib find_alias find_alias_for_msmtp.sh
140 + src_install_contrib msmtpqueue "*.sh" "README ChangeLog"
141 + src_install_contrib msmtpq "msmtpq msmtp-queue" README.msmtpq
142 + src_install_contrib set_sendmail set_sendmail.sh set_sendmail.conf
143 +}
144 +
145 +pkg_postinst() {
146 + if [[ -z ${REPLACING_VERSIONS} ]]; then
147 + einfo "Please edit ${EROOT}/etc/msmtprc before first use."
148 + einfo "In addition, per user configuration files can be placed"
149 + einfo "as '~/.msmtprc'. See the msmtprc-user.example file under"
150 + einfo "/usr/share/doc/${PF}/ for an example."
151 + fi
152 +}
153 +
154 +src_install_contrib() {
155 + subdir="$1"
156 + bins="$2"
157 + docs="$3"
158 + local dir=/usr/share/${PN}/${subdir}
159 + insinto ${dir}
160 + exeinto ${dir}
161 + for i in ${bins} ; do
162 + doexe scripts/${subdir}/${i}
163 + done
164 + for i in ${docs} ; do
165 + newdoc scripts/${subdir}/${i} ${subdir}.${i}
166 + done
167 +}