pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mail/dspam Update to 3.4.1.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/eab940812cfc
branches:  trunk
changeset: 491117:eab940812cfc
user:      xtraeme <xtraeme%pkgsrc.org@localhost>
date:      Mon Mar 21 21:35:52 2005 +0000

description:
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:

 mail/dspam/Makefile         |  59 ++++++++++++++++++++++++++++---------
 mail/dspam/PLIST            |  35 ++++++++++++---------
 mail/dspam/distinfo         |  10 +++---
 mail/dspam/files/dspam.sh   |  70 +++++++++++++++++++++++++++++++++++++++++++++
 mail/dspam/options.mk       |   4 +-
 mail/dspam/patches/patch-aa |  10 +++---
 6 files changed, 147 insertions(+), 41 deletions(-)

diffs (truncated from 357 to 300 lines):

diff -r b21543c2f307 -r eab940812cfc mail/dspam/Makefile
--- a/mail/dspam/Makefile       Mon Mar 21 20:40:01 2005 +0000
+++ b/mail/dspam/Makefile       Mon Mar 21 21:35:52 2005 +0000
@@ -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 @@
 
 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_BINMODE
 BUILD_DEFS+=           DSPAM_LOGDIR
 BUILD_DEFS+=           DSPAM_DOMAIN
+BUILD_DEFS+=           DSPAM_PIDDIR
 
 .include "../../mk/bsd.prefs.mk"
 
@@ -47,6 +55,7 @@
 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 @@
                        --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 @@
 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 @@
                        ${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 -r b21543c2f307 -r eab940812cfc mail/dspam/PLIST
--- a/mail/dspam/PLIST  Mon Mar 21 20:40:01 2005 +0000
+++ b/mail/dspam/PLIST  Mon Mar 21 21:35:52 2005 +0000
@@ -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_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_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_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-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 -r b21543c2f307 -r eab940812cfc mail/dspam/distinfo
--- a/mail/dspam/distinfo       Mon Mar 21 20:40:01 2005 +0000
+++ b/mail/dspam/distinfo       Mon Mar 21 21:35:52 2005 +0000
@@ -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 -r b21543c2f307 -r eab940812cfc mail/dspam/files/dspam.sh
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/mail/dspam/files/dspam.sh Mon Mar 21 21:35:52 2005 +0000
@@ -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 )



Home | Main Index | Thread Index | Old Index