# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI="1" 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" IUSE="+tls" DEPEND="tls? ( dev-libs/openssl )" S=${WORKDIR}/${P}/${PN} src_unpack() { unpack ${A} cd "${S}" echo "# Configuration option for ${PN}" > ${PN}.conf if use tls; then echo "tls-certificate-file=/var/qmail/control/clientcert.pem" >> ${PN}.conf fi } src_compile() { econf --with-debug \ $(use_enable tls) || die "econf failed" emake CFLAGS="${CFLAGS}" || die "emake failed" } src_install() { dobin ${PN} || die "dobin failed" insinto /etc doins ${PN}.conf cd ../documentation 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() { elog "In /var/qmail/control/conf-smtpd insert the line:" elog 'QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} spamdyke -f /etc/spamdyke.conf"' elog "Run spamdyke with the '-h' flag to see the available options and" elog "update /etc/spamdyke.conf accordingly" }