Gentoo Archives: gentoo-commits

From: "Anthony G. Basile" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamdyke/
Date: Sun, 11 Oct 2015 00:35:47
Message-Id: 1444524080.472c7fac34f6c7b9b3ad833e3d9cfadfe2ce3ad2.blueness@gentoo
1 commit: 472c7fac34f6c7b9b3ad833e3d9cfadfe2ce3ad2
2 Author: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 11 00:41:09 2015 +0000
4 Commit: Anthony G. Basile <blueness <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 11 00:41:20 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=472c7fac
7
8 mail-filter/spamdyke: add libressl support
9
10 Package-Manager: portage-2.2.20.1
11
12 mail-filter/spamdyke/spamdyke-4.3.0-r1.ebuild | 81 +++++++++++++++++++++++++++
13 1 file changed, 81 insertions(+)
14
15 diff --git a/mail-filter/spamdyke/spamdyke-4.3.0-r1.ebuild b/mail-filter/spamdyke/spamdyke-4.3.0-r1.ebuild
16 new file mode 100644
17 index 0000000..28f4448
18 --- /dev/null
19 +++ b/mail-filter/spamdyke/spamdyke-4.3.0-r1.ebuild
20 @@ -0,0 +1,81 @@
21 +# Copyright 1999-2015 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Id$
24 +
25 +EAPI="5"
26 +inherit eutils autotools
27 +
28 +DESCRIPTION="A drop-in connection-time spam filter for qmail"
29 +HOMEPAGE="http://www.spamdyke.org/"
30 +SRC_URI="http://www.spamdyke.org/releases/${P}.tgz"
31 +
32 +LICENSE="GPL-2"
33 +SLOT="0"
34 +KEYWORDS="~amd64 ~x86"
35 +IUSE="libressl +tls"
36 +
37 +DEPEND="
38 + tls? (
39 + !libressl? ( dev-libs/openssl:0 )
40 + libressl? ( dev-libs/libressl )
41 + )"
42 +RDEPEND="${DEPEND}
43 + virtual/qmail"
44 +
45 +S=${WORKDIR}/${P}/${PN}
46 +
47 +src_prepare() {
48 + epatch "${FILESDIR}"/${P}-gcc46.patch
49 + echo "# Configuration option for ${PN}" > ${PN}.conf
50 + if use tls; then
51 + echo "tls-certificate-file=/var/qmail/control/clientcert.pem" \
52 + >> ${PN}.conf
53 + fi
54 + echo "graylist-level=always-create-dir" >> ${PN}.conf
55 + echo "graylist-dir=/var/tmp/${PN}/graylist" >> ${PN}.conf
56 + echo "reject-empty-rdns" >> ${PN}.conf
57 + echo "reject-unresolvable-rdns" >> ${PN}.conf
58 + echo "dns-blacklist-entry=zen.spamhaus.org" >> ${PN}.conf
59 + echo "local-domains-file=/var/qmail/control/rcpthosts" >> ${PN}.conf
60 + sed -i \
61 + -e "/STRIP_CMD/d" \
62 + Makefile.in || die "sed on Makefile.in failed"
63 + eautoreconf
64 +}
65 +
66 +src_configure() {
67 + econf \
68 + $(use_enable tls) || die "econf failed"
69 + cd ../utils
70 + econf || die "econf failed in utils"
71 +}
72 +
73 +src_compile() {
74 + emake CFLAGS="${CFLAGS}" || die "emake failed"
75 + cd ../utils
76 + emake CFLAGS="${CFLAGS}" || die "emake in utils died"
77 +}
78 +
79 +src_install() {
80 + dobin ${PN} || die "Installing ${PN} binary failed"
81 + insinto /etc/${PN}
82 + doins ${PN}.conf || die "Installing ${PN} configuration file failed"
83 + dodir /var/tmp/${PN}/graylist
84 + fowners -R qmaild /var/tmp/${PN}/graylist
85 + cd ../utils
86 + dobin domain2path || die "Installing domain2path binary failed"
87 + cd ../documentation
88 + dodoc {Changelog,INSTALL,UPGRADING}.txt
89 + dohtml FAQ.html \
90 + README.html \
91 + README_ip_file_format.html \
92 + README_rdns_directory_format.html \
93 + README_rdns_file_format.html
94 +}
95 +
96 +pkg_postinst() {
97 + elog "In /var/qmail/control/conf-smtpd insert the line:"
98 + elog "QMAIL_SMTP_PRE=\"${QMAIL_SMTP_PRE} spamdyke -f /etc/${PN}/${PN}.conf\""
99 + elog "Run spamdyke with the '-h' flag to see the available options and"
100 + elog "update /etc/spamdyke/spamdyke.conf accordingly"
101 +}