commit:     1c72dffdc796b9aa428abc9e9d557f817f6f9baa
Author:     David Seifert <soap <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 26 14:21:08 2023 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Sat Aug 26 14:21:08 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c72dffd

mail-mta/opensmtpd: add 7.3.0_p1

Bug: https://bugs.gentoo.org/779076
Bug: https://bugs.gentoo.org/881701
Bug: https://bugs.gentoo.org/899788
Bug: https://bugs.gentoo.org/908836
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 mail-mta/opensmtpd/Manifest                  |  1 +
 mail-mta/opensmtpd/files/smtpd-r1.service    | 11 ++++
 mail-mta/opensmtpd/opensmtpd-7.3.0_p1.ebuild | 91 ++++++++++++++++++++++++++++
 3 files changed, 103 insertions(+)

diff --git a/mail-mta/opensmtpd/Manifest b/mail-mta/opensmtpd/Manifest
index f7a170bf9339..2b92b99ea427 100644
--- a/mail-mta/opensmtpd/Manifest
+++ b/mail-mta/opensmtpd/Manifest
@@ -1 +1,2 @@
 DIST opensmtpd-6.8.0p2.tar.gz 860189 BLAKE2B 
603e8516860eddefb1694ea4cb5631cec2df2a19fa3193b25388caf73c41e82d44e57847fc95b5187488cae629542e72ff2d5a17badc15cef1647bdb173d7827
 SHA512 
48f152b75575146fdd09bdf47123041ea62fefb6e5de33a69826bf91a2126a918f8db1caffadb2f142a1a21de8126d492de88cb65bdf169e61c0b22d3e78d290
+DIST opensmtpd-7.3.0p1.tar.gz 849026 BLAKE2B 
bdb83468df12af2a2b39664a4408acfaf0cd81551074fb3823f7eb1b0d30ce79d812876fcea2ff940ddaac8b1a96700e1f4d2c275beab106fed010b733cff5c2
 SHA512 
2106de43e4b7435e49df759570ec758672ca8271dc451e30a261c250b41908b6ffe28e571a5f52e2ac14f59af132d1df45b272f8fcafeab04fcfb6bd5db970bb

diff --git a/mail-mta/opensmtpd/files/smtpd-r1.service 
b/mail-mta/opensmtpd/files/smtpd-r1.service
new file mode 100644
index 000000000000..fccd88f31472
--- /dev/null
+++ b/mail-mta/opensmtpd/files/smtpd-r1.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=OpenSMTPD
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/smtpd
+PIDFile=/run/smtpd.pid
+
+[Install]
+WantedBy=multi-user.target

diff --git a/mail-mta/opensmtpd/opensmtpd-7.3.0_p1.ebuild 
b/mail-mta/opensmtpd/opensmtpd-7.3.0_p1.ebuild
new file mode 100644
index 000000000000..25cf7cb2f25c
--- /dev/null
+++ b/mail-mta/opensmtpd/opensmtpd-7.3.0_p1.ebuild
@@ -0,0 +1,91 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools pam systemd
+
+DESCRIPTION="Lightweight but featured SMTP daemon from OpenBSD"
+HOMEPAGE="https://www.opensmtpd.org";
+SRC_URI="https://www.opensmtpd.org/archives/${P/_}.tar.gz";
+S="${WORKDIR}/${P/_}"
+
+LICENSE="ISC BSD BSD-1 BSD-2 BSD-4"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~riscv ~x86"
+IUSE="berkdb +mta pam split-usr"
+
+RDEPEND="
+       acct-user/smtpd
+       acct-user/smtpq
+       app-misc/ca-certificates
+       dev-libs/libbsd
+       dev-libs/libevent:=
+       dev-libs/openssl:=
+       net-libs/libasr
+       net-mail/mailbase
+       sys-libs/zlib
+       virtual/libcrypt:=
+       berkdb? ( sys-libs/db:= )
+       elibc_musl? ( sys-libs/fts-standalone )
+       pam? ( sys-libs/pam )
+       !mail-mta/courier
+       !mail-mta/esmtp
+       !mail-mta/exim
+       !mail-mta/msmtp[mta]
+       !mail-mta/netqmail
+       !mail-mta/nullmailer
+       !mail-mta/postfix
+       !mail-mta/sendmail
+       !mail-mta/ssmtp[mta]
+"
+DEPEND="${RDEPEND}"
+BDEPEND="app-alternatives/yacc"
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+       # LibreSSL link check
+       SSLeay_add_all_algorithms
+)
+
+src_prepare() {
+       default
+       eautoreconf
+}
+
+src_configure() {
+       econf \
+               --sysconfdir="${EPREFIX}"/etc/smtpd \
+               --with-path-mbox="${EPREFIX}"/var/spool/mail \
+               --with-path-empty="${EPREFIX}"/var/empty \
+               --with-path-socket=/run \
+               
--with-path-CAfile="${EPREFIX}"/etc/ssl/certs/ca-certificates.crt \
+               --with-user-smtpd=smtpd \
+               --with-user-queue=smtpq \
+               --with-group-queue=smtpq \
+               --with-libevent="${EPREFIX}"/usr/$(get_libdir) \
+               --with-libssl="${EPREFIX}"/usr/$(get_libdir) \
+               $(use_with pam auth-pam) \
+               $(use_with berkdb table-db)
+}
+
+src_install() {
+       default
+
+       newinitd "${FILESDIR}"/smtpd.initd smtpd
+       systemd_newunit "${FILESDIR}"/smtpd-r1.service smtpd.service
+
+       use pam && newpamd "${FILESDIR}"/smtpd.pam smtpd
+
+       dosym smtpctl /usr/sbin/makemap
+       dosym smtpctl /usr/sbin/newaliases
+
+       if use mta ; then
+               dodir /usr/sbin
+               dosym smtpctl /usr/sbin/sendmail
+               # on USE="-split-usr" system sbin and bin are merged
+               # so symlink made above will collide with one below
+               use split-usr && dosym ../sbin/smtpctl /usr/bin/sendmail
+               dodir /usr/$(get_libdir)
+               dosym -r /usr/sbin/smtpctl /usr/$(get_libdir)/sendmail
+       fi
+}

Reply via email to