diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /mail-filter/spamdyke/spamdyke-5.0.1.ebuild |
reinit the tree, so we can have metadata
Diffstat (limited to 'mail-filter/spamdyke/spamdyke-5.0.1.ebuild')
-rw-r--r-- | mail-filter/spamdyke/spamdyke-5.0.1.ebuild | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/mail-filter/spamdyke/spamdyke-5.0.1.ebuild b/mail-filter/spamdyke/spamdyke-5.0.1.ebuild new file mode 100644 index 000000000000..9be8f12fbc65 --- /dev/null +++ b/mail-filter/spamdyke/spamdyke-5.0.1.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +inherit eutils autotools + +DESCRIPTION="A drop-in connection-time spam filter for qmail" +HOMEPAGE="http://www.spamdyke.org/" +SRC_URI="http://www.spamdyke.org/releases/${P}.tgz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="libressl +ssl" + +DEPEND=" + ssl? ( + !libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl ) + )" + +RDEPEND=" + ${DEPEND} + virtual/qmail" + +S="${WORKDIR}/${P}/${PN}" + +src_prepare() { + echo "# Configuration option for ${PN}" > ${PN}.conf || die + if use ssl; then + echo "tls-certificate-file=/var/qmail/control/clientcert.pem" \ + >> ${PN}.conf || die + fi + cat <<- EOF >> ${PN}.conf || die +graylist-level=always-create-dir +graylist-dir=/var/tmp/${PN}/graylist +reject-empty-rdns +reject-unresolvable-rdns +dns-blacklist-entry=zen.spamhaus.org +local-domains-file=/var/qmail/control/rcpthosts +EOF + sed -i \ + -e "/STRIP_CMD/d" \ + Makefile.in || die "sed on Makefile.in failed" + eautoreconf +} + +src_configure() { + econf \ + $(use_enable ssl tls) + cd ../utils || die + econf +} + +src_compile() { + emake CFLAGS="${CFLAGS}" + cd ../utils + emake CFLAGS="${CFLAGS}" +} + +src_install() { + insinto /etc/${PN} + doins ${PN}.conf + dodir /var/tmp/${PN}/graylist + fowners -R qmaild /var/tmp/${PN}/graylist + cd ../utils || die + dobin domain2path + cd ../documentation || die + dodoc {Changelog,INSTALL,UPGRADING}.txt + dohtml FAQ.html \ + README.html \ + README_ip_file_format.html \ + README_rdns_directory_format.html \ + README_rdns_file_format.html +} + +pkg_postinst() { + ewarn "Change /var/qmail/control/conf-common:SOFTLIMIT_OPTS="-m 16000000"" + ewarn "to 32000000 or spamdyke will fail to load" + elog "In /var/qmail/control/conf-smtpd insert the line:" + elog "QMAIL_SMTP_PRE=\"${QMAIL_SMTP_PRE} spamdyke -f /etc/${PN}/${PN}.conf\"" + elog "Run spamdyke with the '-h' flag to see the available options and" + elog "update /etc/spamdyke/spamdyke.conf accordingly" +} |