Gentoo Archives: gentoo-commits

From: Dirkjan Ochtman <djc@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/rmilter/, mail-filter/rmilter/files/
Date: Wed, 25 Jan 2017 19:52:40
Message-Id: 1485373951.c7f2ff7d085aea57c4adfda6bdebdc0a55dfe172.djc@gentoo
1 commit: c7f2ff7d085aea57c4adfda6bdebdc0a55dfe172
2 Author: Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 25 19:52:14 2017 +0000
4 Commit: Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 25 19:52:31 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7f2ff7d
7
8 mail-filters/rmilter: start before mta (fixes bug 605592)
9
10 Package-Manager: portage-2.3.0
11
12 mail-filter/rmilter/files/rmilter.initd-r2 | 26 ++++++++++++++++
13 mail-filter/rmilter/rmilter-1.10.0-r2.ebuild | 46 ++++++++++++++++++++++++++++
14 2 files changed, 72 insertions(+)
15
16 diff --git a/mail-filter/rmilter/files/rmilter.initd-r2 b/mail-filter/rmilter/files/rmilter.initd-r2
17 new file mode 100644
18 index 00000000..08b4c64
19 --- /dev/null
20 +++ b/mail-filter/rmilter/files/rmilter.initd-r2
21 @@ -0,0 +1,26 @@
22 +#!/sbin/openrc-run
23 +# Copyright 2015-2017 Gentoo Foundation
24 +# Distributed under the terms of the GNU General Public License v2
25 +
26 +RUNDIR=/var/run/rmilter
27 +PIDFILE=$RUNDIR/rmilter.pid
28 +
29 +depend() {
30 + need net
31 + before mta
32 +}
33 +
34 +start() {
35 + ebegin "Starting ${SVCNAME}"
36 + checkpath -d $RUNDIR -m2750 -o rmilter:rmilter
37 + rm -f $RUNDIR/$SVCNAME.sock
38 + start-stop-daemon --start --quiet --pidfile $PIDFILE -u rmilter \
39 + --exec /usr/sbin/rmilter -- -c /etc/rmilter/rmilter.conf
40 + eend $?
41 +}
42 +
43 +stop() {
44 + ebegin "Stopping ${SVCNAME}"
45 + start-stop-daemon --stop --quiet --pidfile $PIDFILE
46 + eend $?
47 +}
48
49 diff --git a/mail-filter/rmilter/rmilter-1.10.0-r2.ebuild b/mail-filter/rmilter/rmilter-1.10.0-r2.ebuild
50 new file mode 100644
51 index 00000000..1844db6
52 --- /dev/null
53 +++ b/mail-filter/rmilter/rmilter-1.10.0-r2.ebuild
54 @@ -0,0 +1,46 @@
55 +# Copyright 1999-2017 Gentoo Foundation
56 +# Distributed under the terms of the GNU General Public License v2
57 +# $Id$
58 +
59 +EAPI=5
60 +
61 +inherit cmake-utils user
62 +
63 +DESCRIPTION="Another sendmail milter for different mail checks"
64 +SRC_URI="https://github.com/vstakhov/rmilter/archive/${PV}.tar.gz -> ${P}.tar.gz"
65 +HOMEPAGE="https://github.com/vstakhov/rmilter"
66 +
67 +LICENSE="BSD"
68 +SLOT="0"
69 +KEYWORDS="~amd64 ~x86"
70 +IUSE="dkim libressl +memcached"
71 +
72 +RDEPEND="dev-libs/libpcre
73 + !libressl? ( dev-libs/openssl:0= )
74 + libressl? ( dev-libs/libressl:0= )
75 + mail-filter/libmilter
76 + >=dev-libs/glib-2.28
77 + dkim? ( mail-filter/opendkim )
78 + memcached? ( dev-libs/libmemcached )"
79 +DEPEND="${RDEPEND}"
80 +
81 +pkg_setup() {
82 + enewgroup rmilter
83 + enewuser rmilter -1 -1 /var/run/rmilter rmilter
84 +}
85 +
86 +src_configure() {
87 + local mycmakeargs=(
88 + -DENABLE_DKIM=$(usex dkim ON OFF)
89 + -DENABLE_MEMCACHED=$(usex memcached ON OFF)
90 + )
91 + cmake-utils_src_configure
92 +}
93 +
94 +src_install() {
95 + cmake-utils_src_install
96 + newinitd "${FILESDIR}/rmilter.initd-r2" rmilter
97 + insinto /etc/rmilter
98 + newins rmilter.conf.sample rmilter.conf.sample
99 + newins rmilter-grey.conf rmilter-grey.conf
100 +}