logo

overlay

My (experimental) gentoo overlay
commit: bfee3d2fd9b372ce71bea31ad55626714f29bc6d
parent: afe3454c0f91de139f68ec274b72e22ae4245864
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Thu,  7 Nov 2019 05:22:31 +0100

mail-mta/opensmtpd: Version bump, 6.6.1p1

Diffstat:

Mmail-mta/opensmtpd/Manifest1+
Amail-mta/opensmtpd/opensmtpd-6.6.1_p1.ebuild107+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 108 insertions(+), 0 deletions(-)

diff --git a/mail-mta/opensmtpd/Manifest b/mail-mta/opensmtpd/Manifest @@ -1 +1,2 @@ DIST opensmtpd-6.4.2p1.tar.gz 720987 BLAKE2B 27d55aff097fe4fb0f086f021506d0969d54d8143ad89aea508e8afc76b5aef520eb0168a5c6327732660220c1d950141d93fb74c88dcfda123f8d5d3d34d659 SHA512 45b071523a46c441fd436acee44ea841a88ebe93f6b76284ef948fc97535cf73a2962b9a030bffa288227ab8ef90944755748d0036f919df9493d562c1afb694 +DIST opensmtpd-6.6.1p1.tar.gz 776538 BLAKE2B 58eba39a43c2f9bf0772bf91545b54e9dc2aa33b232a8188ac21912ec4fe7ada1e90eac68d9aab21fbdf904ca93b0056c8039edb685be3ad8aa8f2be3913af79 SHA512 8861c2b3d8560217750482694b007e43226033f31c13efa3e705e8d70a172ee30784ba335587ffc5c27fb356f765c696be7b9055c26bf2cd720cd0aa960861ad diff --git a/mail-mta/opensmtpd/opensmtpd-6.6.1_p1.ebuild b/mail-mta/opensmtpd/opensmtpd-6.6.1_p1.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2018 Gentoo Foundation +# Copyright 2018-2019 Haelwenn (lanodan) Monnier <contact@hacktivis.me> +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit multilib user flag-o-matic pam toolchain-funcs autotools systemd + +DESCRIPTION="Lightweight but featured SMTP daemon from OpenBSD" +HOMEPAGE="https://www.opensmtpd.org" +SRC_URI="https://www.opensmtpd.org/archives/${P/_}.tar.gz" + +LICENSE="ISC BSD BSD-1 BSD-2 BSD-4" +SLOT="0" +KEYWORDS="~amd64" +IUSE="libressl pam mdoc +mta" + +DEPEND=" + !libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl ) + sys-libs/zlib + pam? ( sys-libs/pam ) + elibc_musl? ( + sys-libs/fts-standalone + sys-libs/queue-standalone + ) + 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}/${P/_} + +src_prepare() { + default + + # Use /run instead of /var/run + sed -i -e '/pidfile_path/s:_PATH_VARRUN:"/run/":' openbsd-compat/pidfile.c || die + sed -i -e 's;/usr/libexec/;/usr/libexec/opensmtpd/;g' smtpd/parse.y || die + + append-cflags "-ffunction-sections" + append-ldflags "-Wl,--gc-sections" + + eautoreconf +} + +src_configure() { + tc-export AR + AR="$(which "$AR")" econf \ + --with-table-db \ + --with-user-smtpd=smtpd \ + --with-user-queue=smtpq \ + --with-group-queue=smtpq \ + --with-path-socket=/run \ + --with-path-CAfile=/etc/ssl/certs/ca-certificates.crt \ + --sysconfdir=/etc/opensmtpd \ + --with-mantype=$(usex mdoc doc man) \ + $(use_with pam auth-pam) +} + +src_install() { + default + + newinitd "${FILESDIR}"/smtpd.initd smtpd + systemd_dounit "${FILESDIR}"/smtpd.{service,socket} + + use pam && newpamd "${FILESDIR}"/smtpd.pam smtpd + + dosym /usr/sbin/smtpctl /usr/sbin/makemap + dosym /usr/sbin/smtpctl /usr/sbin/newaliases + + 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 +}