blob: fdb6b6b0a0da3780bafad3e6a22a74d67a8b7d2d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
# New ports collection makefile for: antivirus
# Date created: 02.Jan 2004
# Whom: dirk.meyer@dinoex.sub.org
#
# $FreeBSD$
#
PORTNAME= antivirus
PORTVERSION= 3.30
PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://www.nmt.edu/~wcolburn/antivirus/
MAINTAINER= dinoex@FreeBSD.org
COMMENT= Sendmail milter wich uses Mcafee Virus Scan
RUN_DEPENDS= ${LOCALBASE}/bin/ripmime:${PORTSDIR}/mail/ripmime
.if !defined(SENDMAIL_MILTER_IN_BASE)
BUILD_DEPENDS+= ${LOCALBASE}/lib/libmilter.a:${PORTSDIR}/mail/${SENDMAIL_PORT}
.endif
SENDMAIL_PORT?= sendmail
USE_REINPLACE= yes
CFLAGS+= -Wall ${PTHREAD_CFLAGS:S=""==}
LIBS+= -lmilter ${PTHREAD_LIBS}
ANTIVIRUS_DIR?= /var/spool/antivirus
PLIST_SUB+= ANTIVIRUS=${ANTIVIRUS_DIR}
SED_SCRIPT= -e 's|%%ANTIVIRUS%%|${ANTIVIRUS_DIR}|g' \
-e 's|%%PREFIX%%|${PREFIX}|g'
MAKE_ENV+= SENDMAILBASE="${SENDMAILBASE}" \
SENDMAILOBJ="${SENDMAILOBJ}" \
LIBS="${LIBS}"
.if !defined(SENDMAIL_MILTER_IN_BASE)
CFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
SENDMAILBASE= ${LOCALBASE}
SENDMAILOBJ= ${LOCALBASE}
.else
SENDMAILBASE= /usr
SENDMAILOBJ= /usr
.endif
.include <bsd.port.pre.mk>
.if defined(SENDMAIL_WITHOUT_MILTER)
pre-fetch:
@${ECHO_MSG}
@${ECHO_MSG} You must unset variable SENDMAIL_WITHOUT_MILTER,
@${ECHO_MSG} and rebuild sendmail in the ports
@${FALSE}
.endif
do-configure:
@${REINPLACE_CMD} -e 's|/etc/mail/antivirus.conf|${LOCALBASE}/etc/antivirus.conf|' \
${CONFIGURE_WRKSRC}/antivirus.c
@${SED} ${SED_SCRIPT} ${FILESDIR}/antivirus-milter.sh \
> ${WRKSRC}/antivirus-milter.sh
@${SED} ${SED_SCRIPT} ${FILESDIR}/antivirus.conf \
> ${WRKSRC}/antivirus.conf
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/antivirus \
${PREFIX}/libexec/antivirus
${INSTALL_SCRIPT} ${WRKSRC}/antivirus-milter.sh \
${PREFIX}/etc/rc.d/antivirus-milter.sh.sample
${INSTALL_DATA} ${WRKSRC}/antivirus.conf ${PREFIX}/etc/antivirus.conf-dist
${MKDIR} ${ANTIVIRUS_DIR}/spool ${ANTIVIRUS_DIR}/run ${ANTIVIRUS_DIR}/quarantine
${CHOWN} -R nobody:nobody ${ANTIVIRUS_DIR}/
@${ECHO_MSG} "Add to your *.mc configfile:"
@${ECHO_MSG} "INPUT_MAIL_FILTER(\`antivirus', \`S=local:${ANTIVIRUS_DIR}/antivirus.sock, F=')"
.include <bsd.port.post.mk>
|