summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfredo Tupone <tupone@gentoo.org>2008-03-02 22:38:04 +0000
committerAlfredo Tupone <tupone@gentoo.org>2008-03-02 22:38:04 +0000
commit9f31289ff660e6fd275025ac0987f8becedb9a52 (patch)
treea57f9aa1f8474d76628a422193ce87ae245bccfb /mail-filter
parentAdding use flags for mail-filter/simscan (diff)
downloadgentoo-2-9f31289ff660e6fd275025ac0987f8becedb9a52.tar.gz
gentoo-2-9f31289ff660e6fd275025ac0987f8becedb9a52.tar.bz2
gentoo-2-9f31289ff660e6fd275025ac0987f8becedb9a52.zip
Adding USE flags for spamc-user, spam-auth-user and custom-smtp-reject
(Portage version: 2.1.4.4)
Diffstat (limited to 'mail-filter')
-rw-r--r--mail-filter/simscan/ChangeLog7
-rw-r--r--mail-filter/simscan/simscan-1.4.0-r1.ebuild110
2 files changed, 116 insertions, 1 deletions
diff --git a/mail-filter/simscan/ChangeLog b/mail-filter/simscan/ChangeLog
index d1de5e4d15a6..26484f797eff 100644
--- a/mail-filter/simscan/ChangeLog
+++ b/mail-filter/simscan/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for mail-filter/simscan
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/simscan/ChangeLog,v 1.6 2008/02/25 17:21:50 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/simscan/ChangeLog,v 1.7 2008/03/02 22:38:04 tupone Exp $
+
+*simscan-1.4.0-r1 (02 Mar 2008)
+
+ 02 Mar 2008; Tupone Alfredo <tupone@gentoo.org> +simscan-1.4.0-r1.ebuild:
+ Adding USE flags for spamc-user, spam-auth-user and custom-smtp-reject
25 Feb 2008; Jeroen Roovers <jer@gentoo.org> simscan-1.4.0.ebuild:
Fix patch names (thanks to Tobias Schlitt on IRC).
diff --git a/mail-filter/simscan/simscan-1.4.0-r1.ebuild b/mail-filter/simscan/simscan-1.4.0-r1.ebuild
new file mode 100644
index 000000000000..7aead3d8fc6c
--- /dev/null
+++ b/mail-filter/simscan/simscan-1.4.0-r1.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/simscan/simscan-1.4.0-r1.ebuild,v 1.1 2008/03/02 22:38:04 tupone Exp $
+
+inherit autotools toolchain-funcs eutils fixheadtails flag-o-matic
+
+DESCRIPTION="Simscan, a qmail scanner"
+HOMEPAGE="http://inter7.com/?page=simscan"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+LICENSE="GPL-2"
+
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+IUSE="attachment clamav custom-smtp-reject dropmsg passthru per-domain
+quarantine regex received spamassassin spamc-user spam-auth-user"
+
+RESTRICT="test"
+
+DEPEND="attachment? ( net-mail/ripmime )
+ clamav? ( app-antivirus/clamav )
+ spamassassin? ( mail-filter/spamassassin )
+ regex? ( dev-libs/libpcre )"
+
+RDEPEND="${DEPEND}
+ virtual/qmail"
+
+pkg_setup() {
+ test -z "${SIMSCAN_HITS}" && SIMSCAN_HITS=10
+
+ enewgroup simscan
+ enewuser simscan -1 -1 /dev/null simscan
+
+ use clamav && usermod -a -G simscan,nofiles clamav
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PN}-1.3.1-destdir.patch \
+ "${FILESDIR}"/${PN}-1.3.1-printf.patch
+
+ sed -i \
+ -e "s:daily.cvd:main.cvd:g" \
+ configure.in \
+ simscanmk.c \
+ || die "sed failed"
+
+ eautoreconf
+}
+
+src_compile() {
+ econf \
+ --enable-qmaildir=/var/qmail \
+ --enable-qmail-queue=/var/qmail/bin/qmail-queue \
+ $(use_enable attachment attach) \
+ $(use_enable clamav) \
+ $(use_enable clamav clamdscan /usr/bin/clamdscan) \
+ $(use_enable clamav clamavdb-path /var/lib/clamav) \
+ $(use_enable dropmsg) \
+ $(use_enable spamassassin spam) \
+ $(use_enable spamassassin spamc /usr/bin/spamc) \
+ $(use_enable spamassassin spam-hits ${SIMSCAN_HITS}) \
+ $(use_enable spamc-user) \
+ $(use_enable spam-auth-user) \
+ $(use_enable passthru spam-passthru) \
+ $(use_enable quarantine quarantinedir /var/qmail/quarantine) \
+ $(use_enable regex) \
+ $(use_enable custom-smtp-reject) \
+ $(use_enable received) \
+ $(use_enable per-domain) || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc AUTHORS ChangeLog README TODO
+
+ keepdir /var/qmail/control
+ keepdir /var/qmail/simscan
+
+ if use clamav; then
+ echo -n ":clam=yes," > "${D}"/var/qmail/control/simcontrol
+ else
+ echo -n ":clam=no," > "${D}"/var/qmail/control/simcontrol
+ fi
+
+ if use spamassassin; then
+ echo "spam=yes,spam_hits=${SIMSCAN_HITS}" >> "${D}"/var/qmail/control/simcontrol
+ else
+ echo "spam=no" >> "${D}"/var/qmail/control/simcontrol
+ fi
+}
+
+pkg_postinst() {
+ ewarn "Updating simscan configuration files ..."
+ /var/qmail/bin/simscanmk
+
+ ewarn
+ ewarn "You have to do that every time you update clamav or spamassassin"
+ ewarn
+
+ einfo
+ einfo "In order use simscan update the QMAILQUEUE environment variable"
+ einfo "and point it to /var/qmail/bin/simscan"
+ einfo
+ einfo "Read the documentation and customize /var/qmail/control/simcontrol"
+ einfo
+}