summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2013-08-30 19:06:19 +0000
committerPacho Ramos <pacho@gentoo.org>2013-08-30 19:06:19 +0000
commitd78ac063a91cd2c4c83515b4125b003bc29ca289 (patch)
treea4178cfc4aa4e17669f2e3e3e1e1f0cd32e42469 /mail-mta
parentAdd unit file (#465542 by August Hörandl) (diff)
downloadgentoo-2-d78ac063a91cd2c4c83515b4125b003bc29ca289.tar.gz
gentoo-2-d78ac063a91cd2c4c83515b4125b003bc29ca289.tar.bz2
gentoo-2-d78ac063a91cd2c4c83515b4125b003bc29ca289.zip
Add unit file (#470662 by Agostino Sarubbo)
(Portage version: 2.1.13.7/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'mail-mta')
-rw-r--r--mail-mta/opensmtpd/ChangeLog9
-rw-r--r--mail-mta/opensmtpd/files/smtpd.service10
-rw-r--r--mail-mta/opensmtpd/files/smtpd.socket8
-rw-r--r--mail-mta/opensmtpd/opensmtpd-5.3.3.201308201232_p1.ebuild5
-rw-r--r--mail-mta/opensmtpd/opensmtpd-5.3.3_p1-r1.ebuild90
5 files changed, 119 insertions, 3 deletions
diff --git a/mail-mta/opensmtpd/ChangeLog b/mail-mta/opensmtpd/ChangeLog
index 42c25d2d3a9d..7e001b0341ed 100644
--- a/mail-mta/opensmtpd/ChangeLog
+++ b/mail-mta/opensmtpd/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for mail-mta/opensmtpd
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/opensmtpd/ChangeLog,v 1.23 2013/08/26 12:29:32 zx2c4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/opensmtpd/ChangeLog,v 1.24 2013/08/30 19:06:18 pacho Exp $
+
+*opensmtpd-5.3.3_p1-r1 (30 Aug 2013)
+
+ 30 Aug 2013; Pacho Ramos <pacho@gentoo.org> +files/smtpd.service,
+ +files/smtpd.socket, +opensmtpd-5.3.3_p1-r1.ebuild,
+ opensmtpd-5.3.3.201308201232_p1.ebuild:
+ Add unit file (#470662 by Agostino Sarubbo)
*opensmtpd-5.3.3.201308201232_p1 (26 Aug 2013)
diff --git a/mail-mta/opensmtpd/files/smtpd.service b/mail-mta/opensmtpd/files/smtpd.service
new file mode 100644
index 000000000000..fd2a65010604
--- /dev/null
+++ b/mail-mta/opensmtpd/files/smtpd.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=OpenSMTPD
+After=network.target
+
+[Service]
+Type=forking
+ExecStart=/usr/sbin/smtpd
+
+[Install]
+WantedBy=multi-user.target
diff --git a/mail-mta/opensmtpd/files/smtpd.socket b/mail-mta/opensmtpd/files/smtpd.socket
new file mode 100644
index 000000000000..fb42f8557323
--- /dev/null
+++ b/mail-mta/opensmtpd/files/smtpd.socket
@@ -0,0 +1,8 @@
+[Unit]
+Description=OpenSMTPD Socket
+
+[Socket]
+ListenStream=/var/run/smtpd.sock
+
+[Install]
+WantedBy=sockets.target
diff --git a/mail-mta/opensmtpd/opensmtpd-5.3.3.201308201232_p1.ebuild b/mail-mta/opensmtpd/opensmtpd-5.3.3.201308201232_p1.ebuild
index 6af0631d11f4..0f3521f7d173 100644
--- a/mail-mta/opensmtpd/opensmtpd-5.3.3.201308201232_p1.ebuild
+++ b/mail-mta/opensmtpd/opensmtpd-5.3.3.201308201232_p1.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-mta/opensmtpd/opensmtpd-5.3.3.201308201232_p1.ebuild,v 1.1 2013/08/26 12:29:32 zx2c4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/opensmtpd/opensmtpd-5.3.3.201308201232_p1.ebuild,v 1.2 2013/08/30 19:06:18 pacho Exp $
EAPI=5
-inherit multilib user flag-o-matic eutils pam toolchain-funcs autotools versionator
+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/"
@@ -61,6 +61,7 @@ src_configure() {
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
diff --git a/mail-mta/opensmtpd/opensmtpd-5.3.3_p1-r1.ebuild b/mail-mta/opensmtpd/opensmtpd-5.3.3_p1-r1.ebuild
new file mode 100644
index 000000000000..666d409faed8
--- /dev/null
+++ b/mail-mta/opensmtpd/opensmtpd-5.3.3_p1-r1.ebuild
@@ -0,0 +1,90 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/opensmtpd/opensmtpd-5.3.3_p1-r1.ebuild,v 1.1 2013/08/30 19:06:18 pacho Exp $
+
+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_DP="${P}"
+MY_P="${P}"
+if [ $(get_last_version_component_index) -eq 4 ]; then
+ MY_DP="${PN}-$(get_version_component_range 4-)"
+ MY_P="${PN}-${PV/.$(get_version_component_range 4)}"
+fi
+SRC_URI="http://www.opensmtpd.org/archives/${MY_DP/_}.tar.gz"
+
+LICENSE="ISC BSD BSD-1 BSD-2 BSD-4"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="pam sqlite +mta"
+
+DEPEND="dev-libs/openssl
+ sys-libs/zlib
+ pam? ( virtual/pam )
+ sys-libs/db
+ sqlite? ( dev-db/sqlite:3 )
+ dev-libs/libevent
+ !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() {
+ epatch "${FILESDIR}"/build-warnings.patch
+ epatch_user
+ eautoreconf
+}
+
+src_configure() {
+ tc-export AR
+ AR="$(which "$AR")" econf \
+ --with-privsep-user=smtpd \
+ --with-filter-user=smtpf \
+ --with-queue-user=smtpq \
+ --with-privsep-path=/var/empty \
+ --with-sock-dir=/var/run \
+ --sysconfdir=/etc/opensmtpd \
+ $(use_with sqlite experimental-sqlite) \
+ $(use_with pam)
+ #--with-lookup-user=smtpl will be available in the release after some point
+}
+
+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 smtpf 251
+ enewuser smtpf 251 -1 /var/empty smtpf
+ enewgroup smtpq 252
+ enewuser smtpq 252 -1 /var/empty smtpq
+
+ # For release after some point:
+ #enewgroup smtpl 253
+ #enewuser smtpl 253 -1 /var/empty smtpl
+}