e3cbc9ab0b
MailScanner.conf and explicitly start as that user. This avoids setuid in perl (triggering taint mode) and so it sidesteps taint mode fallout which has appeared recently, most likely due to the CVE-2011-1487 fix in Perl. Maintainer believed to be away this week, so committing now and we can change it later if he disagrees when he returns. ok todd@
118 lines
4.6 KiB
Makefile
118 lines
4.6 KiB
Makefile
# $OpenBSD: Makefile,v 1.40 2011/04/21 20:25:35 sthen Exp $
|
|
|
|
COMMENT= virus/spam scanning framework
|
|
|
|
V= 4.83
|
|
Vs= 4
|
|
Vss= ${Vs}-1
|
|
REVISION= 0
|
|
CATEGORIES= mail
|
|
MASTER_SITES= http://mailscanner.info/files/4/tar/
|
|
DISTNAME= mailscanner-${V}.${Vss}
|
|
PKGNAME= mailscanner-${V}.${Vss:S/-/./}
|
|
DISTFILES= MailScanner-install-${V}.${Vss}${EXTRACT_SUFX}
|
|
WRKDIST= ${WRKDIR}/MailScanner-${V}.${Vss}
|
|
|
|
HOMEPAGE= http://www.mailscanner.info/
|
|
|
|
MAINTAINER= Brad Smith <brad@comstyle.com>
|
|
|
|
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
|
|
|
|
# GPLv2+
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
PERMIT_DISTFILES_FTP= Yes
|
|
|
|
NO_BUILD= Yes
|
|
NO_REGRESS= Yes
|
|
|
|
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
|
|
|
|
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
|
|
BINS+= mailscanner_create_locks processing_messages_alert upgrade_MailScanner_conf
|
|
|
|
_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
|
|
ETC+= archives.filename.rules.conf archives.filetype.rules.conf
|
|
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
|
|
|
|
install_etc:
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/MailScanner
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/MailScanner/conf.d
|
|
${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>
|