2012-03-06 15:09:40 -05:00
|
|
|
# $OpenBSD: Makefile,v 1.48 2012/03/06 20:09:40 pea Exp $
|
2008-02-19 22:47:18 -05:00
|
|
|
|
|
|
|
COMMENT= virus/spam scanning framework
|
|
|
|
|
2011-07-22 03:33:55 -04:00
|
|
|
V= 4.84
|
2012-03-06 03:34:20 -05:00
|
|
|
Vs= 5
|
|
|
|
Vss= ${Vs}-2
|
2012-03-06 15:09:40 -05:00
|
|
|
REVISION= 0
|
2008-02-19 22:47:18 -05:00
|
|
|
CATEGORIES= mail
|
|
|
|
MASTER_SITES= http://mailscanner.info/files/4/tar/
|
2008-11-06 21:33:58 -05:00
|
|
|
DISTNAME= mailscanner-${V}.${Vss}
|
2010-05-27 07:04:30 -04:00
|
|
|
PKGNAME= mailscanner-${V}.${Vss:S/-/./}
|
2008-02-19 22:47:18 -05:00
|
|
|
DISTFILES= MailScanner-install-${V}.${Vss}${EXTRACT_SUFX}
|
|
|
|
WRKDIST= ${WRKDIR}/MailScanner-${V}.${Vss}
|
|
|
|
|
|
|
|
HOMEPAGE= http://www.mailscanner.info/
|
|
|
|
|
2009-06-11 19:33:26 -04:00
|
|
|
MAINTAINER= Brad Smith <brad@comstyle.com>
|
2008-02-19 22:47:18 -05:00
|
|
|
|
2010-11-22 04:20:34 -05:00
|
|
|
RUN_DEPENDS+= archivers/lha \
|
|
|
|
archivers/p5-Archive-Zip>=1.30p0 \
|
|
|
|
archivers/unzip \
|
|
|
|
archivers/zoo \
|
|
|
|
converters/p5-Convert-BinHex \
|
|
|
|
converters/p5-Convert-TNEF \
|
|
|
|
databases/p5-DBD-SQLite \
|
|
|
|
databases/p5-DBI \
|
|
|
|
devel/p5-OLE-Storage_Lite \
|
|
|
|
devel/p5-Sys-SigAction \
|
|
|
|
mail/p5-MIME-tools \
|
|
|
|
mail/tnef>=1.4.7 \
|
|
|
|
net/p5-Net-CIDR \
|
|
|
|
net/p5-Sys-Hostname-Long \
|
|
|
|
net/wget \
|
|
|
|
sysutils/p5-Filesys-Df \
|
|
|
|
textproc/antiword \
|
|
|
|
www/p5-HTML-Parser
|
2008-02-19 22:47:18 -05:00
|
|
|
|
2008-05-16 12:38:36 -04:00
|
|
|
# GPLv2+
|
2008-02-19 22:47:18 -05:00
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
|
|
|
|
|
|
|
NO_BUILD= Yes
|
2008-10-05 17:08:49 -04:00
|
|
|
NO_REGRESS= Yes
|
2008-02-19 22:47:18 -05:00
|
|
|
|
|
|
|
post-extract:
|
|
|
|
@cd ${WRKDIR} && ${TAR} xzf MailScanner-install-${V}.${Vs}/perl-tar/MailScanner-${V}.${Vss}${EXTRACT_SUFX} && \
|
|
|
|
find ${WRKDIST} -type d | xargs chmod 755
|
|
|
|
|
|
|
|
do-install: install_libexec install_etc install_share install_lib install_bin
|
|
|
|
|
2009-10-07 16:59:29 -04:00
|
|
|
BINS= MailScanner Quick.Peek df2mbox d2mbox update_bad_phishing_emails
|
|
|
|
BINS+= update_bad_phishing_sites update_phishing_sites check_mailscanner
|
|
|
|
BINS+= clean.quarantine clean.SA.cache analyse_SpamAssassin_cache
|
2009-10-17 12:25:49 -04:00
|
|
|
BINS+= mailscanner_create_locks processing_messages_alert upgrade_MailScanner_conf
|
2008-02-19 22:47:18 -05:00
|
|
|
|
|
|
|
_MS_sed_frag= _subst() { sed 's,%PREFIX%,${LOCALBASE},g;s,%SYSCONFDIR%,${SYSCONFDIR},g' \
|
|
|
|
"$$2" > ${WRKDIST}/file; \
|
|
|
|
case "$$1" in \
|
|
|
|
script) ${INSTALL_SCRIPT} -m 755 ${WRKDIST}/file "$$3";; \
|
|
|
|
data) ${INSTALL_DATA} ${WRKDIST}/file "$$3";; \
|
|
|
|
*) echo "subst invalid 1st arg, given 1=$$1";exit 2;; \
|
|
|
|
esac; }; _subst
|
|
|
|
|
|
|
|
INST_SCRIPT= ${_MS_sed_frag} script
|
|
|
|
INST_DATA= ${_MS_sed_frag} data
|
|
|
|
|
|
|
|
install_bin:
|
|
|
|
.for _f in ${BINS}
|
|
|
|
@${INST_SCRIPT} ${WRKSRC}/bin/${_f} ${PREFIX}/bin/${_f}
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
install_libexec:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/libexec/MailScanner
|
|
|
|
@${INST_SCRIPT} ${WRKSRC}/bin/MailScanner ${PREFIX}/libexec/MailScanner/MailScanner
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/MailScanner/libexec
|
|
|
|
@cd ${WRKSRC}/lib ; find * -name "*-wrapper" | while read f; do ${INST_SCRIPT} "$$f" ${PREFIX}/share/examples/MailScanner/libexec/"$${f}".sample; done
|
|
|
|
@cd ${WRKSRC}/lib ; find * -name "*-autoupdate" | while read f; do ${INST_SCRIPT} "$$f" ${PREFIX}/share/examples/MailScanner/libexec/"$${f}".sample; done
|
|
|
|
|
|
|
|
ETC= MailScanner.conf country.domains.conf filename.rules.conf
|
|
|
|
ETC+= filetype.rules.conf phishing.bad.sites.conf phishing.safe.sites.conf
|
|
|
|
ETC+= spam.assassin.prefs.conf spam.lists.conf virus.scanners.conf
|
2009-05-23 17:30:05 -04:00
|
|
|
ETC+= archives.filename.rules.conf archives.filetype.rules.conf
|
2009-10-07 16:59:29 -04:00
|
|
|
ETC+= conf.d/README mcp/mcp.spam.assassin.prefs.conf mcp/10_example.cf
|
|
|
|
ETC+= mcp/v320.pre rules/bounce.rules rules/max.message.size.rules
|
|
|
|
ETC+= rules/spam.whitelist.rules
|
2008-02-19 22:47:18 -05:00
|
|
|
|
|
|
|
install_etc:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/MailScanner
|
2009-10-07 16:59:29 -04:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/MailScanner/conf.d
|
2008-02-19 22:47:18 -05:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/MailScanner/mcp
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/MailScanner/rules
|
|
|
|
.for _f in ${ETC}
|
|
|
|
@${INST_DATA} ${WRKSRC}/etc/${_f} ${PREFIX}/share/examples/MailScanner/${_f}
|
|
|
|
.endfor
|
|
|
|
@${INST_DATA} ${WRKSRC}/etc/rules/EXAMPLES ${PREFIX}/share/examples/MailScanner/rules/EXAMPLES
|
|
|
|
@${INST_DATA} ${WRKSRC}/etc/rules/README ${PREFIX}/share/examples/MailScanner/rules/README
|
|
|
|
|
|
|
|
install_share:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/MailScanner
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/MailScanner
|
|
|
|
@${INST_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/MailScanner/README
|
|
|
|
@cd ${WRKSRC}/etc ; find reports -type d -exec ${INSTALL_DATA_DIR} ${PREFIX}'/share/examples/MailScanner/{}' \;
|
|
|
|
@cd ${WRKSRC}/etc ; find reports -type f ! -name "*.orig" | while read f; do ${INST_DATA} $$f ${PREFIX}/share/examples/MailScanner/$$f; done
|
|
|
|
@cd ${PREFIX}/share/examples/MailScanner/reports ; find . -name "*.bak" -print0 | xargs -0 rm -f
|
|
|
|
|
|
|
|
install_lib:
|
|
|
|
${INSTALL_PROGRAM_DIR} ${PREFIX}/lib/MailScanner
|
|
|
|
${INSTALL_PROGRAM_DIR} ${PREFIX}/lib/MailScanner/MailScanner
|
|
|
|
${INSTALL_PROGRAM_DIR} ${PREFIX}/lib/MailScanner/MailScanner/CustomFunctions
|
|
|
|
@${INST_SCRIPT} ${WRKSRC}/lib/MailScanner.pm ${PREFIX}/lib/MailScanner/MailScanner.pm
|
|
|
|
@cd ${WRKSRC}/lib/MailScanner ; find * -type f ! -name "*.orig" | while read f; do ${INST_SCRIPT} $$f ${PREFIX}/lib/MailScanner/MailScanner/$$f ; done
|
|
|
|
|
|
|
|
.include <bsd.port.mk>
|