aboutsummaryrefslogtreecommitdiff
path: root/mail/qscan/Makefile
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2004-04-08 15:13:39 +0000
committerAlex Dupre <ale@FreeBSD.org>2004-04-08 15:13:39 +0000
commit6eac6a85e11d22bcf2a87c20a5a2ea21f91ff2c2 (patch)
tree69361664a8e526c8cc79ff8bd246a9706c582d11 /mail/qscan/Makefile
parent22ad20d3605c1b9c1d80422eb6ab37d7ea4cdcf1 (diff)
Add qscan 1.5, a mail filter for Qmail that scans messages with ClamAV.
Notes
Notes: svn path=/head/; revision=106496
Diffstat (limited to 'mail/qscan/Makefile')
-rw-r--r--mail/qscan/Makefile55
1 files changed, 55 insertions, 0 deletions
diff --git a/mail/qscan/Makefile b/mail/qscan/Makefile
new file mode 100644
index 000000000000..0cbcabf95c0b
--- /dev/null
+++ b/mail/qscan/Makefile
@@ -0,0 +1,55 @@
+# New ports collection makefile for: qscan
+# Date created: 8 Apr 2004
+# Whom: Alex Dupre <ale@FreeBSD.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= qscan
+PORTVERSION= 1.5
+CATEGORIES= mail security
+MASTER_SITES= ftp://ftp.c9x.org/qscan/
+
+MAINTAINER= ale@FreeBSD.org
+COMMENT= A mail filter for Qmail that scans messages with ClamAV
+
+RUN_DEPENDS= ${QMAIL_QUEUE}:${PORTSDIR}/mail/qmail \
+ clamdscan:${PORTSDIR}/security/clamav \
+ ripmime:${PORTSDIR}/mail/ripmime
+
+GNU_CONFIGURE= yes
+USE_REINPLACE= yes
+
+.include <bsd.port.pre.mk>
+
+.if exists(${LOCALBASE}/qmail/bin/qmail-queue)
+QMAIL_DIR?= ${LOCALBASE}/qmail
+.else
+QMAIL_DIR?= /var/qmail
+.endif
+QMAIL_QUEUE= ${QMAIL_DIR}/bin/qmail-queue
+QSCAN_VAR?= ${QMAIL_DIR}/${PORTNAME}
+PLIST_SUB+= QSCAN_VAR="${QSCAN_VAR}" \
+ QMAIL_QUEUE="${QMAIL_QUEUE}"
+
+# default 10
+.if defined(WITH_CONCURRENCY)
+CONFIGURE_ARGS+=--with-concurrency=${WITH_CONCURRENCY}
+.endif
+
+CONFIGURE_ENV+= SWEEP="${LOCALBASE}/bin/clamdscan" \
+ RIPMIME="${LOCALBASE}/bin/ripmime" \
+ QMAIL_QUEUE="${QMAIL_QUEUE}-old"
+
+post-patch:
+ @${REINPLACE_CMD} -e "s|/var/qmail/qscan|${QSCAN_VAR}|" ${WRKSRC}/src/qscan.h
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/${PORTNAME} ${PREFIX}/bin
+ ${MKDIR} ${QSCAN_VAR}
+ ${CHMOD} 750 ${QSCAN_VAR}
+ ${CHOWN} qmaild:clamav ${QSCAN_VAR}
+ ${LN} -f ${QMAIL_QUEUE} ${QMAIL_QUEUE}-old
+ ${LN} -sf ${PREFIX}/bin/${PORTNAME} ${QMAIL_QUEUE}
+
+.include <bsd.port.post.mk>