/[gentoo-x86]/mail-filter/spamdyke/spamdyke-4.3.0.ebuild
Gentoo

Contents of /mail-filter/spamdyke/spamdyke-4.3.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Tue Jan 17 22:59:11 2012 UTC (2 years, 10 months ago) by ago
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +2 -2 lines
Stable for X86 and AMD64, wrt security bug #399157

(Portage version: 2.1.10.41/cvs/Linux x86_64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/mail-filter/spamdyke/spamdyke-4.3.0.ebuild,v 1.1 2012/01/17 20:46:44 tupone Exp $
4
5 EAPI="2"
6 inherit eutils autotools
7
8 DESCRIPTION="A drop-in connection-time spam filter for qmail"
9 HOMEPAGE="http://www.spamdyke.org/"
10 SRC_URI="http://www.spamdyke.org/releases/${P}.tgz"
11
12 LICENSE="GPL-2"
13 SLOT="0"
14 KEYWORDS="amd64 x86"
15 IUSE="+tls"
16
17 DEPEND="tls? ( dev-libs/openssl )"
18 RDEPEND="${DEPEND}
19 virtual/qmail"
20
21 S=${WORKDIR}/${P}/${PN}
22
23 src_prepare() {
24 epatch "${FILESDIR}"/${P}-gcc46.patch
25 echo "# Configuration option for ${PN}" > ${PN}.conf
26 if use tls; then
27 echo "tls-certificate-file=/var/qmail/control/clientcert.pem" \
28 >> ${PN}.conf
29 fi
30 echo "graylist-level=always-create-dir" >> ${PN}.conf
31 echo "graylist-dir=/var/tmp/${PN}/graylist" >> ${PN}.conf
32 echo "reject-empty-rdns" >> ${PN}.conf
33 echo "reject-unresolvable-rdns" >> ${PN}.conf
34 echo "dns-blacklist-entry=zen.spamhaus.org" >> ${PN}.conf
35 echo "local-domains-file=/var/qmail/control/rcpthosts" >> ${PN}.conf
36 sed -i \
37 -e "/STRIP_CMD/d" \
38 Makefile.in || die "sed on Makefile.in failed"
39 eautoreconf
40 }
41
42 src_configure() {
43 econf \
44 $(use_enable tls) || die "econf failed"
45 cd ../utils
46 econf || die "econf failed in utils"
47 }
48
49 src_compile() {
50 emake CFLAGS="${CFLAGS}" || die "emake failed"
51 cd ../utils
52 emake CFLAGS="${CFLAGS}" || die "emake in utils died"
53 }
54
55 src_install() {
56 dobin ${PN} || die "Installing ${PN} binary failed"
57 insinto /etc/${PN}
58 doins ${PN}.conf || die "Installing ${PN} configuration file failed"
59 dodir /var/tmp/${PN}/graylist
60 fowners -R qmaild /var/tmp/${PN}/graylist
61 cd ../utils
62 dobin domain2path || die "Installing domain2path binary failed"
63 cd ../documentation
64 dodoc {Changelog,INSTALL,UPGRADING}.txt
65 dohtml FAQ.html \
66 README.html \
67 README_ip_file_format.html \
68 README_rdns_directory_format.html \
69 README_rdns_file_format.html
70 }
71
72 pkg_postinst() {
73 elog "In /var/qmail/control/conf-smtpd insert the line:"
74 elog "QMAIL_SMTP_PRE=\"${QMAIL_SMTP_PRE} spamdyke -f /etc/${PN}/${PN}.conf\""
75 elog "Run spamdyke with the '-h' flag to see the available options and"
76 elog "update /etc/spamdyke/spamdyke.conf accordingly"
77 }

  ViewVC Help
Powered by ViewVC 1.1.20