diff options
author | xtraeme <xtraeme@pkgsrc.org> | 2005-03-21 21:35:52 +0000 |
---|---|---|
committer | xtraeme <xtraeme@pkgsrc.org> | 2005-03-21 21:35:52 +0000 |
commit | 52dd527b2fbe2b2bbd8a5b933ae8befa50e08e11 (patch) | |
tree | f6bfa7fd1e3bfaf669078e63de1fadca63591e9a /mail/dspam | |
parent | 3922d426d85cef98be0d00c1a78d42477f18e76f (diff) | |
download | pkgsrc-52dd527b2fbe2b2bbd8a5b933ae8befa50e08e11.tar.gz |
Update to 3.4.1.
Changes:
o Accuracy Enhancements
o Bayesian Noise Reduction v2.0
o TUM-Mode Enhancements
o Library Performance Enhancements
o PostgreSQL Storage Driver Enhancements
o SQLite3 Storage Driver Support
o Daemonized LMTP Server
o LMTP Delivery
And more... more info in the RELEASE.NOTES file.
pkgsrc changes:
o Add a dspam rc.d script to start the daemon.
o The cgi configuration files were modified to support
CONF_FILES and PKG_SYSCONFDIR.
When using a NetBSD system, mount_umap(8) will be useful to mount
the cgi directory with www permissions, and you won't need to modify
any file in there! yay.
Diffstat (limited to 'mail/dspam')
-rw-r--r-- | mail/dspam/Makefile | 59 | ||||
-rw-r--r-- | mail/dspam/PLIST | 35 | ||||
-rw-r--r-- | mail/dspam/distinfo | 10 | ||||
-rw-r--r-- | mail/dspam/files/dspam.sh | 70 | ||||
-rw-r--r-- | mail/dspam/options.mk | 4 | ||||
-rw-r--r-- | mail/dspam/patches/patch-aa | 10 |
6 files changed, 147 insertions, 41 deletions
diff --git a/mail/dspam/Makefile b/mail/dspam/Makefile index 21a627eb192..a406fcacea5 100644 --- a/mail/dspam/Makefile +++ b/mail/dspam/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.23 2005/03/07 21:00:20 xtraeme Exp $ +# $NetBSD: Makefile,v 1.24 2005/03/21 21:35:52 xtraeme Exp $ -DISTNAME= dspam-3.2.8 +DISTNAME= dspam-3.4.1 CATEGORIES= mail MASTER_SITES= http://www.nuclearelephant.com/projects/dspam/sources/ @@ -19,16 +19,23 @@ REPLACE_PERL= tools/dspam_genaliases.in \ PKGCONFIG_OVERRIDE+= dspam.pc.in -SUBST_CLASSES+= cgi +SUBST_CLASSES+= cgi cgi2 SUBST_STAGE.cgi= post-patch -SUBST_FILES.cgi= cgi/dspam.cgi cgi/admin.cgi \ - cgi/templates/nav_performance.html -SUBST_SED.cgi= -e "s|/usr/local/bin/dspam|${PREFIX}/bin/dspam|g" \ +SUBST_FILES.cgi= cgi/dspam.cgi cgi/admin.cgi \ + cgi/templates/nav_performance.html \ + cgi/configure.pl.in +SUBST_SED.cgi= -e "s|/usr/local/bin/dspam|${PREFIX}/bin/dspam|g" \ -e "s|/var/dspam|${DSPAM_HOME}|g" \ -e "s|/usr/local|${PREFIX}|g" \ -e "s|-deaf|${DSPAM_PSFLAGS}|g" \ -e "s|yourdomain.com|${DSPAM_DOMAIN}|g" SUBST_MESSAGE.cgi= "Fixing paths and default options." +SUBST_STAGE.cgi2= post-patch +SUBST_FILES.cgi2= cgi/dspam.cgi cgi/admin.cgi cgi/admingraph.cgi \ + cgi/graph.cgi +SUBST_SED.cgi2= -e "s|./admins|${PKG_SYSCONFDIR}/cgi-admins|" \ + -e "s|\$$FILE = \"./default.prefs\";|\$$FILE = \"${PKG_SYSCONFDIR}/cgi-default.prefs\";|" \ + -e "s|configure.pl|${PKG_SYSCONFDIR}/configure.pl|" BUILD_DEFS+= DSPAM_HOME BUILD_DEFS+= DSPAM_SIGNATURE_LIFE @@ -36,6 +43,7 @@ BUILD_DEFS+= DSPAM_USER DSPAM_GROUP BUILD_DEFS+= DSPAM_BINMODE BUILD_DEFS+= DSPAM_LOGDIR BUILD_DEFS+= DSPAM_DOMAIN +BUILD_DEFS+= DSPAM_PIDDIR .include "../../mk/bsd.prefs.mk" @@ -47,6 +55,7 @@ DSPAM_USER?= dspam DSPAM_GROUP?= dspam DSPAM_LOGDIR?= ${DSPAM_HOME}/log DSPAM_DOMAIN?= yourdomain.com +DSPAM_PIDDIR?= ${VARBASE}/run/dspam CONFIGURE_ARGS+= --with-signature-life=${DSPAM_SIGNATURE_LIFE} CONFIGURE_ARGS+= --with-dspam-home=${DSPAM_HOME} \ @@ -55,7 +64,9 @@ CONFIGURE_ARGS+= --with-dspam-home=${DSPAM_HOME} \ --with-dspam-owner=${DSPAM_USER} \ --with-dspam-group=${DSPAM_GROUP} \ --with-dspam-mode=${DSPAM_BINMODE} \ - --with-logdir=${DSPAM_LOGDIR} + --with-logdir=${DSPAM_LOGDIR} \ + --sysconfdir=${PKG_SYSCONFDIR} \ + --enable-daemon .include "options.mk" .include "../../devel/pkgconfig/buildlink3.mk" @@ -66,8 +77,18 @@ DATADIR= ${PREFIX}/share/dspam EGDIR= ${PREFIX}/share/examples/dspam USE_PKGINSTALL= yes +RCD_SCRIPTS= dspam + +PKG_SYSCONFSUBDIR= dspam + CONF_FILES_PERMS= ${EGDIR}/dspam.conf ${PKG_SYSCONFDIR}/dspam.conf \ ${BINOWN} ${DSPAM_GROUP} 0640 +CONF_FILES_PERMS+= ${EGDIR}/cgi-admins ${PKG_SYSCONFDIR}/cgi-admins \ + www www 0640 +CONF_FILES_PERMS+= ${EGDIR}/cgi-default.prefs \ + ${PKG_SYSCONFDIR}/cgi-default.prefs www www 0640 +CONF_FILES_PERMS+= ${EGDIR}/configure.pl ${PKG_SYSCONFDIR}/configure.pl \ + www www 0640 PKG_GROUPS= ${DSPAM_GROUP} PKG_USERS= ${DSPAM_USER}:${DSPAM_GROUP} @@ -75,33 +96,43 @@ SPECIAL_PERMS= ${PREFIX}/bin/dspam ${DSPAM_USER} ${DSPAM_GROUP} \ ${DSPAM_BINMODE} OWN_DIRS_PERMS= ${DSPAM_HOME} ${DSPAM_USER} ${DSPAM_GROUP} 0775 OWN_DIRS_PERMS+= ${DSPAM_LOGDIR} ${DSPAM_USER} ${DSPAM_GROUP} 0775 +OWN_DIRS_PERMS+= ${DSPAM_PIDDIR} ${DSPAM_USER} ${DSPAM_GROUP} 0700 + +FILES_SUBST+= DSPAM_USER=${DSPAM_USER} +FILES_SUBST+= DSPAM_GROUP=${DSPAM_GROUP} +FILES_SUBST+= DSPAM_PIDDIR=${DSPAM_PIDDIR} SUBST_CLASSES+= conf SUBST_STAGE.conf= pre-install -SUBST_FILES.conf= dspam.conf.in +SUBST_FILES.conf= src/dspam.conf.in SUBST_SED.conf= -e "s,@dspam_home@,${DSPAM_HOME},g" \ -e "s,@delivery_agent@,${DSPAM_DELIVERY_AGENT_BIN},g" SUBST_MESSAGE.conf= "Fixing configuration file." post-install: ${INSTALL_DATA_DIR} ${DOCDIR} - ${INSTALL_DATA} ${WRKSRC}/README* ${DOCDIR} + ${INSTALL_DATA} ${WRKSRC}/README ${DOCDIR} ${INSTALL_DATA} ${WRKSRC}/RELEASE.NOTES ${DOCDIR} + ${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${DOCDIR} ${INSTALL_DATA_DIR} ${DATADIR} ${INSTALL_DATA_DIR} ${EGDIR} - ${INSTALL_DATA} ${WRKSRC}/dspam.conf.in ${EGDIR}/dspam.conf + ${INSTALL_DATA} ${WRKSRC}/src/dspam.conf.in ${EGDIR}/dspam.conf + ${INSTALL_DATA} ${WRKSRC}/cgi/admins ${EGDIR}/cgi-admins + ${INSTALL_DATA} ${WRKSRC}/cgi/default.prefs ${EGDIR}/cgi-default.prefs + ${INSTALL_DATA} ${WRKSRC}/cgi/configure.pl ${EGDIR}/configure.pl + .for d in txt cgi ${INSTALL_DATA_DIR} ${DATADIR}/${d} cd ${WRKSRC}/${d} && ${PAX} -rwppm '-s|.*/Makefile.*$$||' \ - . ${DATADIR}/${d} + '-s|./admins.*$$||' '-s|./default.prefs.*$$||' \ + '-s|./configure.pl.*$$||' . ${DATADIR}/${d} .endfor - ${RM} ${DATADIR}/cgi/configure.pl.in .undef d .for drv in mysql pgsql sqlite . if !empty(DSPAM_STORAGE_DRIVER:M${drv}) ${INSTALL_DATA_DIR} ${DATADIR}/${drv} - cd ${WRKSRC}/tools.${drv}_drv && ${PAX} -rwppm '-s|.*/Makefile.*$$||' \ - . ${DATADIR}/${drv} + cd ${WRKSRC}/src/tools.${drv}_drv && \ + ${PAX} -rwppm '-s|.*/Makefile.*$$||' . ${DATADIR}/${drv} . endif .endfor .undef drv diff --git a/mail/dspam/PLIST b/mail/dspam/PLIST index ed04cf84817..6b930c40969 100644 --- a/mail/dspam/PLIST +++ b/mail/dspam/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.5 2004/11/15 08:13:13 xtraeme Exp $ +@comment $NetBSD: PLIST,v 1.6 2005/03/21 21:35:52 xtraeme Exp $ bin/dspam bin/dspam_2sql bin/dspam_admin @@ -7,18 +7,20 @@ bin/dspam_corpus bin/dspam_crc bin/dspam_dump bin/dspam_genaliases +bin/dspam_logrotate bin/dspam_merge bin/dspam_stats +bin/dspamc include/dspam/buffer.h include/dspam/config.h include/dspam/decode.h +include/dspam/diction.h include/dspam/error.h -include/dspam/lht.h +include/dspam/heap.h include/dspam/libdspam.h include/dspam/libdspam_objects.h include/dspam/nodetree.h include/dspam/storage_driver.h -include/dspam/tbt.h lib/libdspam.la lib/pkgconfig/dspam.pc man/man1/dspam.1 @@ -37,19 +39,22 @@ man/man3/dspam_init.3 man/man3/dspam_process.3 man/man3/libdspam.3 share/doc/dspam/README -share/doc/dspam/README.courier -share/doc/dspam/README.exim -share/doc/dspam/README.pop3filter -share/doc/dspam/README.postfix -share/doc/dspam/README.qmail -share/doc/dspam/README.sendmail share/doc/dspam/RELEASE.NOTES +share/doc/dspam/courier.txt +share/doc/dspam/exim.txt +share/doc/dspam/mysql_drv.txt +share/doc/dspam/ora_drv.txt +share/doc/dspam/osx.txt +share/doc/dspam/pgsql_drv.txt +share/doc/dspam/pop3filter.txt +share/doc/dspam/postfix.txt +share/doc/dspam/qmail.txt +share/doc/dspam/sendmail.txt +share/doc/dspam/sqlite_drv.txt +share/doc/dspam/win32.txt share/dspam/cgi/admin.cgi share/dspam/cgi/admingraph.cgi -share/dspam/cgi/admins share/dspam/cgi/base.css -share/dspam/cgi/configure.pl -share/dspam/cgi/default.prefs share/dspam/cgi/dspam-logo-small.gif share/dspam/cgi/dspam.cgi share/dspam/cgi/graph.cgi @@ -66,7 +71,6 @@ share/dspam/cgi/templates/nav_performance.html share/dspam/cgi/templates/nav_preferences.html share/dspam/cgi/templates/nav_quarantine.html share/dspam/cgi/templates/nav_viewmessage.html -${MYSQL}share/dspam/mysql/README ${MYSQL}share/dspam/mysql/mysql_objects-4.1.sql ${MYSQL}share/dspam/mysql/mysql_objects-space.sql ${MYSQL}share/dspam/mysql/mysql_objects-speed.sql @@ -74,15 +78,16 @@ ${MYSQL}share/dspam/mysql/purge.sql ${MYSQL}share/dspam/mysql/purge-4.1.sql ${MYSQL}share/dspam/mysql/virtual_users.sql ${MYSQL}share/dspam/mysql/neural.sql -${PGSQL}share/dspam/pgsql/README ${PGSQL}share/dspam/pgsql/pgsql_objects.sql ${PGSQL}share/dspam/pgsql/purge.sql ${PGSQL}share/dspam/pgsql/virtual_users.sql -${SQLITE}share/dspam/sqlite/README ${SQLITE}share/dspam/sqlite/purge.sql share/dspam/txt/firstrun.txt share/dspam/txt/firstspam.txt share/dspam/txt/quarantinefull.txt +share/examples/dspam/cgi-admins +share/examples/dspam/cgi-default.prefs +share/examples/dspam/configure.pl share/examples/dspam/dspam.conf @dirrm share/examples/dspam @dirrm share/dspam/txt diff --git a/mail/dspam/distinfo b/mail/dspam/distinfo index 96cce8f7ba2..37f9acda208 100644 --- a/mail/dspam/distinfo +++ b/mail/dspam/distinfo @@ -1,6 +1,6 @@ -$NetBSD: distinfo,v 1.13 2005/03/07 21:00:20 xtraeme Exp $ +$NetBSD: distinfo,v 1.14 2005/03/21 21:35:52 xtraeme Exp $ -SHA1 (dspam-3.2.8.tar.gz) = 5958b703f8a65b4e074961179632f0a92da3469f -RMD160 (dspam-3.2.8.tar.gz) = dc5a4ae7fcf9daa924b68b532687791f2b5fdc70 -Size (dspam-3.2.8.tar.gz) = 621195 bytes -SHA1 (patch-aa) = 0f5ca6fc4c03ea0b73ccd1214f047fec6ffe4cb3 +SHA1 (dspam-3.4.1.tar.gz) = 00829c9bca90d4bf4316bb95b266d1953589e4ea +RMD160 (dspam-3.4.1.tar.gz) = 3ada3ce0d0ce850cd91d05e4e94dc73f588b92dd +Size (dspam-3.4.1.tar.gz) = 692977 bytes +SHA1 (patch-aa) = 15c6fc58dd0d91799f0c97554f4188cbe68dbd96 diff --git a/mail/dspam/files/dspam.sh b/mail/dspam/files/dspam.sh new file mode 100644 index 00000000000..d0aa97c67c9 --- /dev/null +++ b/mail/dspam/files/dspam.sh @@ -0,0 +1,70 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: dspam.sh,v 1.1 2005/03/21 21:35:52 xtraeme Exp $ +# + +# PROVIDE: dspam +# BEFORE: DAEMON + +if [ -f /etc/rc.subr ]; then + . /etc/rc.subr +fi + +name="dspam" +rcvar="${name}" +command="@PREFIX@/bin/${name}" +pidfile="@DSPAM_PIDDIR@/${name}.pid" +command_args="--daemon > /dev/null 2>&1 &" +dspam_user="@DSPAM_USER@" +dspam_group="@DSPAM_GROUP@" +start_precmd="dspam_precmd" + +dspam_precmd() +{ + if [ ! -d @DSPAM_PIDDIR@ ]; then + @MKDIR@ @DSPAM_PIDDIR@ + @CHMOD@ 0700 @DSPAM_PIDDIR@ + @CHOWN@ @DSPAM_USER@ @DSPAM_PIDDIR@ + fi +} + +if [ -f /etc/rc.subr -a -f /etc/rc.conf -a -f /etc/rc.d/DAEMON ]; then + load_rc_config $name + run_rc_command "$1" +else + case ${1:-start} in + start) + dspam_precmd + if [ -x ${command} ]; then + echo "Starting ${name}." + eval ${command} ${distccd_flags} ${command_args} + fi + ;; + stop) + if [ -f ${pidfile} ]; then + pid=`/bin/head -1 ${pidfile}` + echo "Stopping ${name}." + kill -TERM ${pid} + else + echo "${name} not running?" + fi + ;; + restart) + ( $0 stop ) + sleep 1 + $0 start + ;; + status) + if [ -f ${pidfile} ]; then + pid=`/bin/head -1 ${pidfile}` + echo "${name} is running as pid ${pid}." + else + echo "${name} is not running." + fi + ;; + esac +fi + +if [ "$1" != "stop" -o "$1" != "status" ]; then + echo $(check_process $command) > $pidfile +fi diff --git a/mail/dspam/options.mk b/mail/dspam/options.mk index dc8858178c7..1f4c9931e5b 100644 --- a/mail/dspam/options.mk +++ b/mail/dspam/options.mk @@ -1,4 +1,4 @@ -# $NetBSD: options.mk,v 1.6 2004/10/29 07:07:44 xtraeme Exp $ +# $NetBSD: options.mk,v 1.7 2005/03/21 21:35:52 xtraeme Exp $ .if defined(DSPAM_DELIVERY_AGENT) && !empty(DSPAM_DELIVERY_AGENT:Mcustom) DSPAM_DELIVERY_AGENT:= ${DSPAM_DELIVERY_AGENT_ARGS} @@ -95,7 +95,7 @@ PKG_SUPPORTED_OPTIONS+= preferences-extension virtualusers CONFIGURE_ARGS+= --enable-preferences-extension .endif -### +### ### Tells DSPAM to create virtual user ids. Use this if your users are ### not system users. ### diff --git a/mail/dspam/patches/patch-aa b/mail/dspam/patches/patch-aa index c648e3949a4..c55a1ba61c4 100644 --- a/mail/dspam/patches/patch-aa +++ b/mail/dspam/patches/patch-aa @@ -1,8 +1,8 @@ -$NetBSD: patch-aa,v 1.2 2004/10/22 05:43:29 xtraeme Exp $ +$NetBSD: patch-aa,v 1.3 2005/03/21 21:35:52 xtraeme Exp $ ---- Makefile.in.orig 2004-10-22 07:27:16.000000000 +0200 -+++ Makefile.in 2004-10-22 07:27:35.000000000 +0200 -@@ -261,7 +261,7 @@ +--- src/Makefile.in.orig 2005-02-17 15:16:55.000000000 +0100 ++++ src/Makefile.in 2005-02-17 15:17:01.000000000 +0100 +@@ -251,7 +251,7 @@ pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = dspam.pc etcdir = $(sysconfdir) @@ -10,4 +10,4 @@ $NetBSD: patch-aa,v 1.2 2004/10/22 05:43:29 xtraeme Exp $ +etc_SCRIPTS = # Defaults from dspam.conf - EXTRA_DIST = autogen.sh RELEASE.NOTES CHANGELOG LICENSE example.c \ + EXTRA_DIST = example.c dspam-button.gif dspam.pc.in dspam-uninstalled.pc.in \ |