2009-06-11 19:33:26 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.15 2009/06/11 23:33:26 sthen Exp $
|
2008-02-19 22:47:18 -05:00
|
|
|
|
|
|
|
COMMENT= virus/spam scanning framework
|
|
|
|
|
2009-06-11 19:33:26 -04:00
|
|
|
V= 4.77
|
|
|
|
Vs= 10
|
2009-01-28 10:16:17 -05:00
|
|
|
Vss= ${Vs}-1
|
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}
|
|
|
|
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
|
|
|
|
|
|
|
RUN_DEPENDS+= ::databases/p5-DBI \
|
|
|
|
::archivers/p5-Archive-Zip \
|
|
|
|
::mail/p5-MIME-tools \
|
|
|
|
::net/p5-Net-CIDR \
|
|
|
|
::net/p5-Sys-Hostname-Long \
|
|
|
|
::www/p5-HTML-Parser \
|
|
|
|
::converters/p5-Convert-BinHex \
|
|
|
|
::converters/p5-Convert-TNEF \
|
|
|
|
::sysutils/p5-Filesys-Df \
|
|
|
|
::mail/tnef \
|
|
|
|
::archivers/unzip \
|
|
|
|
::archivers/lha \
|
|
|
|
::archivers/zoo \
|
2008-05-16 12:38:36 -04:00
|
|
|
::net/wget \
|
2008-11-06 21:33:58 -05:00
|
|
|
::devel/p5-OLE-Storage_Lite \
|
|
|
|
::textproc/antiword
|
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
|
|
|
|
|
2008-04-24 17:31:00 -04:00
|
|
|
BINS= MailScanner df2mbox d2mbox update_bad_phishing_sites update_phishing_sites
|
|
|
|
BINS+= check_mailscanner clean.quarantine clean.SA.cache analyse_SpamAssassin_cache
|
2009-04-08 18:29:24 -04:00
|
|
|
BINS+= mailscanner_create_locks processing_messages_alert
|
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
|
2008-02-19 22:47:18 -05:00
|
|
|
ETC+= mcp/mcp.spam.assassin.prefs.conf mcp/10_example.cf mcp/v320.pre
|
|
|
|
ETC+= rules/bounce.rules rules/max.message.size.rules rules/spam.whitelist.rules
|
|
|
|
|
|
|
|
install_etc:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/MailScanner
|
|
|
|
${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
|
|
|
|
@${INST_DATA} ${FILESDIR}/README.OpenBSD.port ${PREFIX}/share/doc/MailScanner/README.OpenBSD.port
|
|
|
|
@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>
|