Pkgsrc changes: - Removed PKG_DESTDIR_SUPPORT until the issue with encoded ownership in +INSTALL files is resolved. - made pkglint shut up about some warnings (CONFIGURE_DIRS, BUILD_DIRS, hidden commands with @) - parse-rules-for-masses has moved in the source archive. - The directories "masses" and "tools" are no longer distributed in the archive so I simplified the post-install target. - Since "tools" is gone, the post-extract: target is obsolete. - MESSAGE now points at sa-compile. - Spamc depends on zlib now, so we needed the appropriate buildlink3 file. Summary of changes since version 3.1.8: ======================================= * new behavior for trusted_networks/internal_networks: the 127.* network is now always considered trusted and internal, regardless of configuration. * bug 3109: short-circuiting of 'definite ham' or 'definite spam' messages based on individual short-circuit rules using the 'shortcircuit' setting, by Dallas Engelken <dallase /at/ uribl.com>. * bug 5305: implement 'msa_networks', for ISPs to specify their Mail Submission Agents, and extend network trust accordingly. * bug 4636: Add support for charset normalization, so rules can be written in UTF-8 to match text in other charsets. * sa-compile: compilation of SpamAssassin rules into a fast parallel-matching DFA, implemented in native code. * "tflags multiple": allow writing of rules that count multiple hits in a single message. * bug 4363: if a message uses CRLF for line endings, we should use it as well, otherwise stay with LF as usual; important for Windows users. * bug 4515: content preview was omitting first paragraph when no Subject: header was present. * The third-party modules used by sa-update are now required by the SpamAssassin package, instead of being optional. * Bug 5165: 'sa-update --checkonly' added to check for updates without applying them; thanks to <anomie /at/ users.sourceforge.net> * Bugs 4606, 4609: Adjust MIME parsing limits for nested multipart/* and message/rfc822 MIME parts. * bug 5295: add 'whitelist_auth', to whitelist addresses that send mail using sender-authorization systems like SPF, Domain Keys, and DKIM * Removed dependency on Text::Wrap CPAN module. * Received header parsing updates/fixes/additions. Spamc / spamd: * bug 4603: Mail::SpamAssassin::Spamd::Apache2 -- mod_perl2 module, implementing spamd as a mod_perl module, contributed as a Google Summer of Code project by Radoslaw Zielinski. * bug 3991: spamd can now listen on UNIX domain, TCP, and SSL sockets simultaneously. Command-line semantics extended slightly, although fully backwards compatibly; add the --ssl-port switch to allow TCP and SSL listening at the same time. * bug 3466: do Bayes expiration, if required, after results have been passed back to the client from spamd; this helps avoid client timeouts. * more complete IPv6 support. * spamc: Add '-K' switch, to ping spamd. * spamc: add '-z' switch, which compresses mails to be scanned using zlib compression; very useful for long-distance use of spamc over the internet. * bug 5296: spamc '--headers' switch, which scans messages and transmits back just rewritten headers. This is more bandwidth-efficient than the normal mode of scanning, but only works for 'report_safe 0'. * Bump spamd's protocol version to 1.4, to reflect new HEADERS verb used for '--headers'. Mail::SpamAssassin modules and API: * bug 4589: allow M::SA::Message to use IO::File objects to read in message (same as GLOB). * bug 4517: rule instrumentation plugin hooks, to measure performance, from John Gardiner Myers <jgmyers /at/ proofpoint.com>. * add two features to core rule-parsing code; 1. optional behaviour to recurse through subdirs looking for .cf/.pre's, to support rules compilers working on rulesrc dir. 2. call back into invoking code on lint failure, so rule compiler can detect which rules exactly fail the lint check. * bug 5206: detect duplicate rules, and silently merge them internally for greater efficiency. * bug 5243: add Plugin::register_method_priority() API, allowing plugins to control the relative ordering of plugin callbacks relative to other plugins' implementations. * Reduced memory footprint. Plugins: * bug 5236: Support Mail::SPF replacement for Mail::SPF::Query. * bug 5127: allow mimeheader :raw rules to match newlines and folded-header whitespace in MIME header strings. * bug 4770: add ASN.pm plugin, contributed by Matthias Leisi <matthias at leisi.net> * bug 5271: move ImageInfo ruleset into 3.2.0 core rules, thanks to Dallas Engelken <dallase /at/ uribl.com>. * VBounce ruleset and plugin: detect spurious bounce messages sent by broken mail systems in response to spam or viruses. (Based on Tim Jackson's "bogus-virus-warnings.cf" ruleset.) * DomainKeys/DKIM: Mail::DKIM is now preferred over Mail::DomainKeys, since the latter module is no longer actively maintained, and Mail::DKIM can handle both DomainKeys and DKIM signatures. * DKIM: separate signature verification from fetching a policy: can save a DNS lookup for each unverified message by setting score to 0 for all policy-related rules (DKIM_POLICY_SIGNALL, DKIM_POLICY_SIGNSOME, and DKIM_POLICY_TESTING). (thanks to Mark Martinec) * DKIM: support testing flags in the public key, as well as in the policy record. (thanks to Mark Martinec) * DKIM: skip fetching a policy (SSP) if a signature does verify, according to draft-allman-dkim-ssp-02 (thanks to Mark Martinec) * Move rule functionality and checking into separate Check plugin, allowing third parties to implement alternative scanner core algorithms. * core EvalTests code moved into various plugins. * Plus lots of miscellaneous bug fixes.
185 lines
6.3 KiB
Makefile
185 lines
6.3 KiB
Makefile
# $NetBSD: Makefile,v 1.80 2007/05/02 15:20:45 heinz Exp $
|
|
|
|
DISTNAME= Mail-SpamAssassin-3.2.0
|
|
PKGNAME= spamassassin-3.2.0
|
|
SVR4_PKGNAME= sa
|
|
CATEGORIES= mail perl5
|
|
MASTER_SITES= ${MASTER_SITE_APACHE:=spamassassin/source/}
|
|
|
|
MAINTAINER= heinz@NetBSD.org
|
|
HOMEPAGE= http://spamassassin.apache.org/
|
|
COMMENT= Mail filter to identify spam
|
|
|
|
PKG_INSTALLATION_TYPES= overwrite pkgviews
|
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
DEPENDS+= p5-Net-DNS>=0.34:../../net/p5-Net-DNS
|
|
DEPENDS+= p5-HTML-Parser>=3.31:../../www/p5-HTML-Parser
|
|
DEPENDS+= p5-Digest-SHA1-[0-9]*:../../security/p5-Digest-SHA1
|
|
DEPENDS+= {p5-MIME-Base64>=2.11,perl>=5.8.0}:../../converters/p5-MIME-Base64
|
|
DEPENDS+= p5-libwww-[0-9]*:../../www/p5-libwww
|
|
DEPENDS+= p5-Archive-Tar>=1.23:../../archivers/p5-Archive-Tar
|
|
DEPENDS+= p5-IO-Zlib>=1.04:../../devel/p5-IO-Zlib
|
|
|
|
USE_TOOLS+= perl
|
|
|
|
.if (${OPSYS} != "NetBSD") && (${OPSYS} != "DragonFly")
|
|
DEPENDS+= p5-DB_File-[0-9]*:../../databases/p5-DB_File
|
|
.endif
|
|
|
|
CONFLICTS= p5-Mail-SpamAssassin-[1-9]*
|
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME}
|
|
|
|
PKG_SYSCONFSUBDIR= spamassassin
|
|
|
|
# Set contact address (e-mail, URL, ...) for use in spam report messages
|
|
# See "perldoc Mail::SpamAssassin::Conf" for option "report_contact"
|
|
SPAMASSASSIN_CONTACT_ADDRESS?= postmaster
|
|
|
|
.include "options.mk"
|
|
|
|
BUILD_DEFS+= SPAMASSASSIN_CONTACT_ADDRESS
|
|
|
|
PLIST_ADD= ${WRKSRC}/.PLIST_ADD
|
|
PLIST_SRC= ${PKGDIR}/PLIST ${PLIST_ADD}
|
|
PERL5_PACKLIST= auto/Mail/SpamAssassin/.packlist
|
|
|
|
GNU_CONFIGURE= YES
|
|
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
|
|
CONFIGURE_DIRS= spamc
|
|
BUILD_DIRS= .
|
|
PERL5_CONFIGURE= NO # we need the default "do-configure" target
|
|
PERL5_CONFIGURE_DIRS= ${WRKSRC}
|
|
|
|
# test t/meta needs this
|
|
REPLACE_PERL+= build/parse-rules-for-masses
|
|
|
|
MAKE_PARAMS+= CONTACT_ADDRESS=${SPAMASSASSIN_CONTACT_ADDRESS:Q}
|
|
MAKE_PARAMS+= DEFRULESDIR="${RULESDIR}"
|
|
MAKE_PARAMS+= LOCALRULESDIR="${PKG_SYSCONFDIR}"
|
|
MAKE_PARAMS+= LOCALSTATEDIR="${VARBASE}/spamassassin"
|
|
MAKE_PARAMS+= PERL_BIN="${PERL5}"
|
|
MAKE_PARAMS+= SYSCONFDIR="${PKG_SYSCONFDIR}"
|
|
|
|
RCD_SCRIPTS= spamd
|
|
RCD_SCRIPT_SRC.spamd= ${WRKSRC}/spamd/netbsd-rc-script.sh
|
|
|
|
EG_SUBDIR= share/examples/spamassassin
|
|
EGDIR= ${PREFIX}/${EG_SUBDIR}
|
|
DOC_SUBDIR= share/doc/spamassassin
|
|
DOCDIR= ${PREFIX}/${DOC_SUBDIR}
|
|
RULE_SUBDIR= share/spamassassin
|
|
RULESDIR= ${PREFIX}/${RULE_SUBDIR}
|
|
|
|
PRE_FILES= init.pre v310.pre v312.pre v320.pre
|
|
.for p in ${PRE_FILES}
|
|
CONF_FILES+= ${EGDIR}/${p} ${PKG_SYSCONFDIR}/${p}
|
|
.endfor
|
|
CONF_FILES+= ${EGDIR}/local.cf ${PKG_SYSCONFDIR}/local.cf \
|
|
${RULESDIR}/user_prefs.template \
|
|
${PKG_SYSCONFDIR}/user_prefs.template
|
|
|
|
SA_INSTALLDIRS= ${EG_SUBDIR} ${DOC_SUBDIR} ${DOC_SUBDIR}/ldap
|
|
SA_INSTALLDIRS+= ${DOC_SUBDIR}/rules ${DOC_SUBDIR}/spamc
|
|
SA_INSTALLDIRS+= ${DOC_SUBDIR}/spamd ${DOC_SUBDIR}/sql ${RULE_SUBDIR}
|
|
|
|
SA_DOCFILES= INSTALL LICENSE README TRADEMARK UPGRADE USAGE NOTICE
|
|
SA_DOCFILES+= CREDITS PACKAGING Changes
|
|
SA_DOCFILES+= ldap/README ldap/README.testing ldap/sa_test.ldif
|
|
SA_DOCFILES+= rules/STATISTICS-set0.txt rules/STATISTICS-set1.txt
|
|
SA_DOCFILES+= rules/STATISTICS-set2.txt rules/STATISTICS-set3.txt
|
|
SA_DOCFILES+= spamc/README.qmail
|
|
SA_DOCFILES+= sample-nonspam.txt sample-spam.txt
|
|
SA_DOCFILES+= spamd/README spamd/README.vpopmail
|
|
SA_DOCFILES+= sql/README sql/README.awl sql/README.bayes
|
|
SA_DOCFILES+= sql/awl_mysql.sql sql/awl_pg.sql sql/bayes_mysql.sql
|
|
SA_DOCFILES+= sql/bayes_pg.sql sql/userpref_mysql.sql
|
|
SA_DOCFILES+= sql/userpref_pg.sql
|
|
|
|
OWN_DIRS+= ${VARBASE}/spamassassin
|
|
OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/sa-update-keys ${SHAREOWN} ${SHAREGRP} 0700
|
|
|
|
SUBST_CLASSES+= sa2
|
|
SUBST_STAGE.sa2= pre-configure
|
|
SUBST_FILES.sa2= README spamd/spamd.raw
|
|
SUBST_SED.sa2= -e s!@@PREFIX@@!${PREFIX}!g
|
|
SUBST_SED.sa2+= -e s!@PKG_SYSCONFDIR@!${PKG_SYSCONFDIR}!g
|
|
|
|
SUBST_CLASSES+= sa3
|
|
SUBST_STAGE.sa3= pre-configure
|
|
SUBST_FILES.sa3= INSTALL UPGRADE USAGE ldap/README
|
|
SUBST_FILES.sa3+= spamc/README.qmail
|
|
SUBST_FILES.sa3+= lib/Mail/SpamAssassin/Conf.pm
|
|
SUBST_FILES.sa3+= lib/Mail/SpamAssassin/Plugin/Test.pm
|
|
SUBST_FILES.sa3+= spamd/README spamd/README.vpopmail sql/README
|
|
SUBST_FILES.sa3+= sql/README.awl sa-learn.raw sa-compile.raw sa-update.raw
|
|
SUBST_SED.sa3= -e s!/usr/share!${PREFIX}/share!g
|
|
SUBST_SED.sa3+= -e s!/usr/bin!${PREFIX}/bin!g
|
|
SUBST_SED.sa3+= -e s!/usr/local/bin!${PREFIX}/bin!g
|
|
SUBST_SED.sa3+= -e s!/usr/lib!${PREFIX}/lib!g
|
|
SUBST_SED.sa3+= -e s!/etc/mail/spamassassin!${PKG_SYSCONFDIR}!g
|
|
|
|
.if (${OPSYS} == "NetBSD") || (${OPSYS} == "DragonFly")
|
|
# the 'spamd' RCD_SCRIPT behaves differently if we run NetBSD 1.6 or later
|
|
. if (${OPSYS} == "NetBSD") && !empty(OS_VERSION:M1.[0-5]*)
|
|
INTERPRETER_SUPPORT= NO
|
|
. else
|
|
INTERPRETER_SUPPORT= YES
|
|
. endif
|
|
.endif
|
|
|
|
# These variables are substituted in netbsd-rc-script.sh.
|
|
FILES_SUBST+= INTERPRETER_SUPPORT=${INTERPRETER_SUPPORT:Q}
|
|
FILES_SUBST+= OPSYS=${OPSYS:Q}
|
|
|
|
pre-configure: perl5-configure
|
|
# GNU configure needs version.h -> create it
|
|
cd ${WRKSRC}/spamc && ${PERL5} ./version.h.pl
|
|
# values will be set via the SUBST framework in options.mk
|
|
${CP} ${WRKSRC}/t/config.dist ${WRKSRC}/t/config
|
|
|
|
post-install:
|
|
${TEST} -r ${PLIST_ADD} && ${RM} ${PLIST_ADD} ; :
|
|
.for dir in ${SA_INSTALLDIRS}
|
|
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/${dir}
|
|
.endfor
|
|
.for f in ${SA_DOCFILES}
|
|
${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${DOCDIR}/${f}
|
|
${ECHO} "${DOC_SUBDIR}/${f}" >> ${PLIST_ADD}
|
|
.endfor
|
|
|
|
cd ${WRKSRC}/rules; \
|
|
for f in [0-9]*.cf; do \
|
|
${ECHO} "${RULE_SUBDIR}/$$f" >> ${PLIST_ADD}; \
|
|
done; \
|
|
for f in ${PRE_FILES}; do \
|
|
${INSTALL_DATA} $$f ${DESTDIR}${EGDIR} && \
|
|
${ECHO} ${EG_SUBDIR}/$$f >> ${PLIST_ADD}; \
|
|
done
|
|
# examples are in the static PLIST
|
|
${INSTALL_DATA} ${WRKSRC}/procmailrc.example ${DESTDIR}${EGDIR}
|
|
${INSTALL_DATA} ${WRKSRC}/rules/local.cf ${DESTDIR}${EGDIR}
|
|
${INSTALL_DATA} ${FILESDIR}/netbsd_lists.cf ${DESTDIR}${EGDIR}
|
|
{ for d in ${SA_INSTALLDIRS}; do \
|
|
${ECHO} "@dirrm $$d"; \
|
|
done; } | ${SORT} -r >> ${PLIST_ADD};
|
|
|
|
# make sure we install the patched version of init.pre but can run the
|
|
# tests with the original file
|
|
pre-patch:
|
|
${CP} ${WRKSRC}/rules/init.pre ${WRKDIR}/init.pre.notpatched
|
|
|
|
post-patch:
|
|
${CP} ${WRKSRC}/rules/init.pre ${WRKDIR}/init.pre.patched
|
|
|
|
pre-test:
|
|
${CP} ${WRKDIR}/init.pre.notpatched ${WRKSRC}/rules/init.pre
|
|
|
|
post-test:
|
|
${CP} ${WRKDIR}/init.pre.patched ${WRKSRC}/rules/init.pre
|
|
|
|
.include "../../devel/zlib/buildlink3.mk"
|
|
.include "../../lang/perl5/module.mk"
|
|
.include "../../mk/bsd.pkg.mk"
|