2003-09-24 13:47:38 +00:00
|
|
|
# New ports collection makefile for: antivir-milter
|
|
|
|
# Date created: 21 September 2003
|
|
|
|
# Whom: marius@alchemy.franken.de
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= antivir-milter
|
2005-07-10 15:04:00 +00:00
|
|
|
PORTVERSION= 1.1.0p7
|
2004-12-11 21:28:36 +00:00
|
|
|
DISTVERSIONPREFIX= prof-
|
2005-07-10 15:04:00 +00:00
|
|
|
DISTVERSION= ${PORTVERSION:C/p/-/}
|
|
|
|
CATEGORIES= security mail
|
|
|
|
MASTER_SITES= http://dl.antivir.de/down/unix/packages/
|
2003-09-24 13:47:38 +00:00
|
|
|
|
2004-04-20 13:49:29 +00:00
|
|
|
MAINTAINER= marius@FreeBSD.org
|
2003-09-24 13:47:38 +00:00
|
|
|
COMMENT= AntiVir Milter mail virusscanner for Sendmail
|
|
|
|
|
|
|
|
RESTRICTED= H+BEDV Datentechnik GmbH forbids any redistribution
|
|
|
|
NO_PACKAGE= ${RESTRICTED}
|
|
|
|
NO_CDROM= ${RESTRICTED}
|
|
|
|
|
|
|
|
ONLY_FOR_ARCHS= i386
|
|
|
|
NO_BUILD= yes
|
|
|
|
USE_REINPLACE= yes
|
2003-10-14 16:04:48 +00:00
|
|
|
# Auto re-fetch sucks!
|
|
|
|
FETCH_CMD= /usr/bin/fetch -A
|
2004-10-20 18:22:23 +00:00
|
|
|
# When the avmilter binary is stripped its self-check fails.
|
|
|
|
STRIP=
|
2003-09-24 13:47:38 +00:00
|
|
|
PKGMESSAGE= ${WRKDIR}/pkg-message
|
|
|
|
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2004-12-11 21:28:36 +00:00
|
|
|
.if ${OSVERSION} < 400000
|
|
|
|
IGNORE= requires FreeBSD 4.0 or higher
|
|
|
|
.endif
|
|
|
|
|
2004-04-12 12:53:50 +00:00
|
|
|
.if (!exists(/usr/lib/libmilter.a)) && (!exists(${LOCALBASE}/lib/libmilter.a))
|
2003-09-24 13:47:38 +00:00
|
|
|
IGNORE= requires Sendmail 8.12
|
|
|
|
.endif
|
|
|
|
|
2004-12-11 21:28:36 +00:00
|
|
|
.if ${OSVERSION} >= 503001 && ${OSVERSION} <= 600004
|
|
|
|
BINSRC= ${WRKSRC}/bin/freebsd5
|
|
|
|
.else
|
|
|
|
BINSRC= ${WRKSRC}/bin/freebsd
|
2003-09-24 13:47:38 +00:00
|
|
|
.if ${OSVERSION} >= 500000
|
|
|
|
LIB_DEPENDS= c.4:${PORTSDIR}/misc/compat4x
|
|
|
|
.endif
|
2004-12-11 21:28:36 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
post-extract:
|
2005-07-10 15:04:00 +00:00
|
|
|
@${CP} ${FILESDIR}/avq.sh ${WRKSRC}/script/avq
|
2004-12-11 21:28:36 +00:00
|
|
|
@${MV} ${WRKSRC}/templates/en/patho-admnistrator\
|
|
|
|
${WRKSRC}/templates/en/patho-administrator
|
|
|
|
@${MV} ${WRKSRC}/templates/en/virus-admnistrator\
|
|
|
|
${WRKSRC}/templates/en/virus-administrator
|
2003-09-24 13:47:38 +00:00
|
|
|
|
|
|
|
post-patch:
|
2004-03-05 15:08:29 +00:00
|
|
|
.for i in doc/MANUAL etc/antivir.conf etc/avmilter.conf init/rc.avmilter \
|
2004-12-11 21:28:36 +00:00
|
|
|
pgp/README script/avq script/avupdater
|
2004-04-12 12:53:50 +00:00
|
|
|
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g; \
|
|
|
|
s|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/${i}
|
2003-09-24 13:47:38 +00:00
|
|
|
.endfor
|
|
|
|
@${SED} 's|%%PREFIX%%|${PREFIX}|g' ${PKGDIR}/pkg-message > \
|
|
|
|
${WRKDIR}/pkg-message
|
|
|
|
@${SED} 's|%%PREFIX%%|${PREFIX}|g' ${FILESDIR}/antivirupdater.sh > \
|
|
|
|
${WRKDIR}/antivirupdater.sh
|
2004-03-08 08:03:50 +00:00
|
|
|
@${SED} 's|%%PREFIX%%|${PREFIX}|g' ${FILESDIR}/avqrm.sh > \
|
|
|
|
${WRKDIR}/avqrm.sh
|
2003-09-24 13:47:38 +00:00
|
|
|
|
|
|
|
do-install:
|
2004-03-05 15:08:29 +00:00
|
|
|
@${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 ${PREFIX}/AntiVir
|
2004-12-11 21:28:36 +00:00
|
|
|
@${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 ${BINSRC}/antivir \
|
2004-10-20 18:22:23 +00:00
|
|
|
${PREFIX}/AntiVir/antivir-dist_avmilter
|
2003-09-24 13:47:38 +00:00
|
|
|
.if !exists(${PREFIX}/AntiVir/antivir)
|
2004-12-11 21:28:36 +00:00
|
|
|
@${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 755 ${BINSRC}/antivir \
|
2003-09-24 13:47:38 +00:00
|
|
|
${PREFIX}/AntiVir
|
|
|
|
.endif
|
2004-03-05 15:08:29 +00:00
|
|
|
@${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${WRKSRC}/vdf/antivir.vdf \
|
2004-10-20 18:22:23 +00:00
|
|
|
${PREFIX}/AntiVir/antivir.vdf-dist_avmilter
|
2003-09-24 13:47:38 +00:00
|
|
|
.if !exists(${PREFIX}/AntiVir/antivir.vdf)
|
2004-03-05 15:08:29 +00:00
|
|
|
@${INSTALL} -o ${BINOWN} -g ${BINGRP} -m 644 ${WRKSRC}/vdf/antivir.vdf \
|
2003-09-24 13:47:38 +00:00
|
|
|
${PREFIX}/AntiVir
|
|
|
|
.endif
|
|
|
|
@${INSTALL_SCRIPT} ${WRKSRC}/script/avq ${PREFIX}/bin
|
2004-10-20 18:22:23 +00:00
|
|
|
@${INSTALL} -d ${PREFIX}/etc/avmilter
|
|
|
|
.for i in avmilter.conf avmilter.ignore avmilter.scan avmilter.warn
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/etc/${i} ${PREFIX}/etc/avmilter/${i}.sample
|
|
|
|
.if !exists(${PREFIX}/etc/avmilter/${i})
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/etc/${i} ${PREFIX}/etc/avmilter
|
2003-09-24 13:47:38 +00:00
|
|
|
.endif
|
|
|
|
.endfor
|
2004-10-20 18:22:23 +00:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/etc/antivir.conf \
|
|
|
|
${PREFIX}/etc/antivir.conf.sample
|
|
|
|
.if !exists(${PREFIX}/etc/antivir.conf)
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/etc/antivir.conf ${PREFIX}/etc
|
|
|
|
.endif
|
2005-07-10 15:04:00 +00:00
|
|
|
@${LN} -sf ${PREFIX}/etc/antivir.conf /etc
|
2004-12-11 21:28:36 +00:00
|
|
|
@${INSTALL_PROGRAM} ${BINSRC}/avmilter ${PREFIX}/sbin
|
2003-09-24 13:47:38 +00:00
|
|
|
@${INSTALL_SCRIPT} ${WRKDIR}/antivirupdater.sh \
|
|
|
|
${PREFIX}/sbin/antivirupdater
|
2004-03-08 08:03:50 +00:00
|
|
|
@${INSTALL_SCRIPT} ${WRKDIR}/avqrm.sh ${PREFIX}/bin/avqrm
|
2003-09-24 13:47:38 +00:00
|
|
|
@${INSTALL_SCRIPT} ${WRKSRC}/init/rc.avmilter \
|
2004-10-20 18:22:23 +00:00
|
|
|
${PREFIX}/etc/rc.d/avmilter.sh
|
2004-12-11 21:28:36 +00:00
|
|
|
@${INSTALL_SCRIPT} ${WRKSRC}/script/avupdater \
|
|
|
|
${PREFIX}/etc/rc.d/avupdater.sh-dist_avmilter
|
2004-03-05 15:08:29 +00:00
|
|
|
@${INSTALL} -d -o smmsp -g smmsp -m 700 /var/spool/avmilter
|
2003-09-24 13:47:38 +00:00
|
|
|
.for i in incoming outgoing rejected
|
2004-03-05 15:08:29 +00:00
|
|
|
@${INSTALL} -d -o smmsp -g smmsp -m 700 /var/spool/avmilter/${i}
|
|
|
|
.endfor
|
|
|
|
@${INSTALL} -d ${EXAMPLESDIR}
|
2003-09-24 13:47:38 +00:00
|
|
|
.for i in de en es hu it nl
|
|
|
|
@${INSTALL} -d ${EXAMPLESDIR}/templates/${i}
|
|
|
|
.for j in patho-administrator patho-recipient patho-sender virus-administrator \
|
|
|
|
virus-recipient virus-sender
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/templates/${i}/${j} \
|
|
|
|
${EXAMPLESDIR}/templates/${i}
|
|
|
|
.endfor
|
|
|
|
.endfor
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${INSTALL} -d ${DOCSDIR}
|
|
|
|
.for i in ChangeLog LICENSE LICENSE.DE
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/${i} ${DOCSDIR}
|
|
|
|
.endfor
|
2005-07-10 15:04:00 +00:00
|
|
|
.for i in MANUAL avmilter_de.pdf avmilter_en.pdf
|
2003-09-24 13:47:38 +00:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/doc/${i} ${DOCSDIR}
|
|
|
|
.endfor
|
2004-10-20 18:22:23 +00:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/pgp/README ${DOCSDIR}/README.gpg
|
2003-09-24 13:47:38 +00:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/pgp/antivir.gpg ${DOCSDIR}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-install:
|
|
|
|
@${CAT} ${WRKDIR}/pkg-message
|
|
|
|
|
|
|
|
.include <bsd.port.post.mk>
|