Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-mta/opensmtpd/
Date: Sun, 11 Oct 2015 01:04:59
Message-Id: 1444525826.0d91b20aadbe9ee1f5ddab4ed6ad0c75514695ad.blueness@gentoo
1 commit: 0d91b20aadbe9ee1f5ddab4ed6ad0c75514695ad
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 11 01:10:26 2015 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 11 01:10:26 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d91b20a
7
8 mail-mta/opensmtpd: add libressl support
9
10 Package-Manager: portage-2.2.20.1
11
12 mail-mta/opensmtpd/opensmtpd-5.7.3_p1-r1.ebuild | 94 +++++++++++++++++++++++++
13 1 file changed, 94 insertions(+)
14
15 diff --git a/mail-mta/opensmtpd/opensmtpd-5.7.3_p1-r1.ebuild b/mail-mta/opensmtpd/opensmtpd-5.7.3_p1-r1.ebuild
16 new file mode 100644
17 index 0000000..ef9a286
18 --- /dev/null
19 +++ b/mail-mta/opensmtpd/opensmtpd-5.7.3_p1-r1.ebuild
20 @@ -0,0 +1,94 @@
21 +# Copyright 1999-2015 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI=5
26 +
27 +inherit multilib user flag-o-matic eutils pam toolchain-funcs autotools systemd versionator
28 +
29 +DESCRIPTION="Lightweight but featured SMTP daemon from OpenBSD"
30 +HOMEPAGE="http://www.opensmtpd.org/"
31 +MY_P="${P}"
32 +if [ $(get_last_version_component_index) -eq 4 ]; then
33 + MY_P="${PN}-$(get_version_component_range 4-)"
34 +fi
35 +SRC_URI="https://www.opensmtpd.org/archives/${MY_P/_}.tar.gz"
36 +
37 +LICENSE="ISC BSD BSD-1 BSD-2 BSD-4"
38 +SLOT="0"
39 +KEYWORDS="~amd64 ~x86"
40 +IUSE="libressl pam +mta"
41 +
42 +DEPEND="!libressl? ( dev-libs/openssl:0 )
43 + libressl? ( dev-libs/libressl )
44 + sys-libs/zlib
45 + pam? ( virtual/pam )
46 + sys-libs/db:=
47 + dev-libs/libevent
48 + app-misc/ca-certificates
49 + net-mail/mailbase
50 + net-libs/libasr
51 + !mail-mta/courier
52 + !mail-mta/esmtp
53 + !mail-mta/exim
54 + !mail-mta/mini-qmail
55 + !mail-mta/msmtp[mta]
56 + !mail-mta/netqmail
57 + !mail-mta/nullmailer
58 + !mail-mta/postfix
59 + !mail-mta/qmail-ldap
60 + !mail-mta/sendmail
61 + !mail-mta/ssmtp[mta]
62 +"
63 +RDEPEND="${DEPEND}"
64 +
65 +S=${WORKDIR}/${MY_P/_}
66 +
67 +src_prepare() {
68 + # Use /run instead of /var/run
69 + sed -i -e '/pidfile_path/s:_PATH_VARRUN:"/run/":' openbsd-compat/pidfile.c || die
70 +
71 + epatch_user
72 + eautoreconf
73 +}
74 +
75 +src_configure() {
76 + tc-export AR
77 + AR="$(which "$AR")" econf \
78 + --enable-table-db \
79 + --with-privsep-user=smtpd \
80 + --with-queue-user=smtpq \
81 + --with-privsep-path=/var/empty \
82 + --with-sock-dir=/run \
83 + --sysconfdir=/etc/opensmtpd \
84 + --with-ca-file=/etc/ssl/certs/ca-certificates.crt \
85 + $(use_with pam)
86 +}
87 +
88 +src_install() {
89 + default
90 + newinitd "${FILESDIR}"/smtpd.initd smtpd
91 + systemd_dounit "${FILESDIR}"/smtpd.{service,socket}
92 + use pam && newpamd "${FILESDIR}"/smtpd.pam smtpd
93 + if use mta ; then
94 + dodir /usr/sbin
95 + dosym /usr/sbin/smtpctl /usr/sbin/sendmail
96 + dosym /usr/sbin/smtpctl /usr/bin/sendmail
97 + dosym /usr/sbin/smtpctl /usr/$(get_libdir)/sendmail
98 + fi
99 +}
100 +
101 +pkg_preinst() {
102 + enewgroup smtpd 25
103 + enewuser smtpd 25 -1 /var/empty smtpd
104 + enewgroup smtpq 252
105 + enewuser smtpq 252 -1 /var/empty smtpq
106 +}
107 +
108 +pkg_postinst() {
109 + einfo
110 + einfo "Plugins for SQLite, MySQL, PostgreSQL, LDAP, socketmaps,"
111 + einfo "Redis, and many other useful addons and filters are"
112 + einfo "available in the mail-filter/opensmtpd-extras package."
113 + einfo
114 +}