summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2015-10-10 21:10:26 -0400
committerAnthony G. Basile <blueness@gentoo.org>2015-10-10 21:10:26 -0400
commit0d91b20aadbe9ee1f5ddab4ed6ad0c75514695ad (patch)
treedf5ee2152ba9ec7a6655db425249aefdc96b4386 /mail-mta
parentmail-mta/netqmail: add libressl support (diff)
downloadgentoo-0d91b20aadbe9ee1f5ddab4ed6ad0c75514695ad.tar.gz
gentoo-0d91b20aadbe9ee1f5ddab4ed6ad0c75514695ad.tar.bz2
gentoo-0d91b20aadbe9ee1f5ddab4ed6ad0c75514695ad.zip
mail-mta/opensmtpd: add libressl support
Package-Manager: portage-2.2.20.1
Diffstat (limited to 'mail-mta')
-rw-r--r--mail-mta/opensmtpd/opensmtpd-5.7.3_p1-r1.ebuild94
1 files changed, 94 insertions, 0 deletions
diff --git a/mail-mta/opensmtpd/opensmtpd-5.7.3_p1-r1.ebuild b/mail-mta/opensmtpd/opensmtpd-5.7.3_p1-r1.ebuild
new file mode 100644
index 000000000000..ef9a28680ae7
--- /dev/null
+++ b/mail-mta/opensmtpd/opensmtpd-5.7.3_p1-r1.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit multilib user flag-o-matic eutils pam toolchain-funcs autotools systemd versionator
+
+DESCRIPTION="Lightweight but featured SMTP daemon from OpenBSD"
+HOMEPAGE="http://www.opensmtpd.org/"
+MY_P="${P}"
+if [ $(get_last_version_component_index) -eq 4 ]; then
+ MY_P="${PN}-$(get_version_component_range 4-)"
+fi
+SRC_URI="https://www.opensmtpd.org/archives/${MY_P/_}.tar.gz"
+
+LICENSE="ISC BSD BSD-1 BSD-2 BSD-4"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="libressl pam +mta"
+
+DEPEND="!libressl? ( dev-libs/openssl:0 )
+ libressl? ( dev-libs/libressl )
+ sys-libs/zlib
+ pam? ( virtual/pam )
+ sys-libs/db:=
+ dev-libs/libevent
+ app-misc/ca-certificates
+ net-mail/mailbase
+ net-libs/libasr
+ !mail-mta/courier
+ !mail-mta/esmtp
+ !mail-mta/exim
+ !mail-mta/mini-qmail
+ !mail-mta/msmtp[mta]
+ !mail-mta/netqmail
+ !mail-mta/nullmailer
+ !mail-mta/postfix
+ !mail-mta/qmail-ldap
+ !mail-mta/sendmail
+ !mail-mta/ssmtp[mta]
+"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P/_}
+
+src_prepare() {
+ # Use /run instead of /var/run
+ sed -i -e '/pidfile_path/s:_PATH_VARRUN:"/run/":' openbsd-compat/pidfile.c || die
+
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ tc-export AR
+ AR="$(which "$AR")" econf \
+ --enable-table-db \
+ --with-privsep-user=smtpd \
+ --with-queue-user=smtpq \
+ --with-privsep-path=/var/empty \
+ --with-sock-dir=/run \
+ --sysconfdir=/etc/opensmtpd \
+ --with-ca-file=/etc/ssl/certs/ca-certificates.crt \
+ $(use_with pam)
+}
+
+src_install() {
+ default
+ newinitd "${FILESDIR}"/smtpd.initd smtpd
+ systemd_dounit "${FILESDIR}"/smtpd.{service,socket}
+ use pam && newpamd "${FILESDIR}"/smtpd.pam smtpd
+ if use mta ; then
+ dodir /usr/sbin
+ dosym /usr/sbin/smtpctl /usr/sbin/sendmail
+ dosym /usr/sbin/smtpctl /usr/bin/sendmail
+ dosym /usr/sbin/smtpctl /usr/$(get_libdir)/sendmail
+ fi
+}
+
+pkg_preinst() {
+ enewgroup smtpd 25
+ enewuser smtpd 25 -1 /var/empty smtpd
+ enewgroup smtpq 252
+ enewuser smtpq 252 -1 /var/empty smtpq
+}
+
+pkg_postinst() {
+ einfo
+ einfo "Plugins for SQLite, MySQL, PostgreSQL, LDAP, socketmaps,"
+ einfo "Redis, and many other useful addons and filters are"
+ einfo "available in the mail-filter/opensmtpd-extras package."
+ einfo
+}