summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-mail/simscan/simscan-1.1.ebuild')
-rw-r--r--net-mail/simscan/simscan-1.1.ebuild52
1 files changed, 14 insertions, 38 deletions
diff --git a/net-mail/simscan/simscan-1.1.ebuild b/net-mail/simscan/simscan-1.1.ebuild
index f18eee60b..0482c96b3 100644
--- a/net-mail/simscan/simscan-1.1.ebuild
+++ b/net-mail/simscan/simscan-1.1.ebuild
@@ -11,7 +11,7 @@ SRC_URI="http://www.inter7.com/${PN}/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
-IUSE="attachment clamav custom-smtp-reject dropmsg received passthru perdomain regex quarantine spamassassin"
+IUSE="attachment clamav custom-smtp-reject dropmsg received passthru per-domain regex quarantine spamassassin"
DEPEND="clamav? ( app-antivirus/clamav )
attachment? ( net-mail/ripmime )
@@ -29,12 +29,14 @@ pkg_setup() {
src_compile() {
local myconf
-
- if use clamav ; then
- myconf="${myconf} --enable-clamav=y"
- else
- myconf="${myconf} --enable-clamav=n"
- fi
+
+ for flag in clamav custom-smtp-reject dropmsg per-domain received ; do
+ if use ${flag} ; then
+ myconf="${myconf} --enable-${flag}=y"
+ else
+ myconf="${myconf} --enable-${flag}=n"
+ fi
+ done
if use attachment ; then
myconf="${myconf} --enable-attach=y"
@@ -43,18 +45,6 @@ src_compile() {
myconf="${myconf} --enable-attach=n"
fi
- if use custom-smtp-reject ; then
- myconf="${myconf} --enable-custom-smtp-reject=y"
- else
- myconf="${myconf} --enable-custom-smtp-reject=n"
- fi
-
- if use dropmsg ; then
- myconf="${myconf} --enable-dropmsg=y"
- else
- myconf="${myconf} --enable-dropmsg=n"
- fi
-
if use regex ; then
myconf="${myconf} --enable-regex=y"
myconf="${myconf} --enable-pcre"
@@ -64,18 +54,6 @@ src_compile() {
use quarantine && myconf="${myconf} --enable-quarantinedir"
- if use perdomain ; then
- myconf="${myconf} --enable-per-domain=y"
- else
- myconf="${myconf} --enable-per-domain=n"
- fi
-
- if use received ; then
- myconf="${myconf} --enable-received=y"
- else
- myconf="${myconf} --enable-received=n"
- fi
-
if use spamassassin ; then
myconf="${myconf} --enable-spam=y"
if use passthru ; then
@@ -94,7 +72,6 @@ src_compile() {
src_install() {
einfo "Installing documentation and contrib files"
dodoc AUTHORS README TODO
-
docinto contrib
dodoc contrib/*.patch
@@ -108,7 +85,7 @@ src_install() {
fowners simscan /var/qmail/simscan /var/qmail/bin/simscan
fperms 4711 /var/qmail/bin/simscan
- if use perdomain ; then
+ if use per-domain ; then
einfo "Setting default configuration..."
echo ':clam=yes,spam=yes' > simcontrol
insopts -o root -g root -m 644
@@ -118,9 +95,8 @@ src_install() {
}
pkg_postinst() {
- einfo
-
if use custom-smtp-reject ; then
+ ewarn
ewarn "Be careful when using the \"custom-smtp-reject\" flag you will"
ewarn "have many problems if qmail was not patched with"
ewarn "qmail-queue-custom-error.patch"
@@ -130,7 +106,7 @@ pkg_postinst() {
fi
einfo "Now update the simscan configuration files :"
- ewarn "You have to do that after clamav or spamassassin update"
+ einfo "You have to do that after clamav or spamassassin update"
einfo
einfo "/var/qmail/bin/simscanmk"
einfo "`/var/qmail/bin/simscanmk`"
@@ -140,12 +116,12 @@ pkg_postinst() {
einfo
einfo "You must have qmail with QMAILQUEUE patch"
- einfo "And, in order use simscan, edit your tcp.qmail-smtpd rules"
+ einfo "In order use simscan, edit your tcp.qmail-smtpd rules"
einfo "and update as follow (for example only)"
einfo
einfo ":allow,QMAILQUEUE=\"/var/qmail/bin/simscan\""
einfo
- ewarn "Read the documentation and personnalize /var/qmail/control/simcontrol"
+ einfo "Read the documentation and personalize /var/qmail/control/simcontrol"
einfo
}