aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorandreas <andreas@FreeBSD.org>2004-08-06 04:39:41 +0800
committerandreas <andreas@FreeBSD.org>2004-08-06 04:39:41 +0800
commit0eac03ac660796879a647fe679adf05999bcd971 (patch)
treef46a275ac888f447c4f53659baed0c31856b53e1 /mail
parent2fbaa1bb4f6103a7905ea2161d9f72f1ee4b181a (diff)
downloadfreebsd-ports-gnome-0eac03ac660796879a647fe679adf05999bcd971.tar.gz
freebsd-ports-gnome-0eac03ac660796879a647fe679adf05999bcd971.tar.zst
freebsd-ports-gnome-0eac03ac660796879a647fe679adf05999bcd971.zip
- dspam-devel port (dspam 3.1.0)
- 1st release of this port after repository copy - Plus one port dependency fix from me, if "WITH_APACHE2=yes" is set. To prevent overinstallation of apache2, although its already present. Am using sbin/apachectl now as trigger instead of httpd.conf, which has different pathnames in apache/apache2, - PR will be closed by me PR: 68358 Submitted by: Ion-Mihai Tetcu <itetcu@people.tecnik93.com> Reviewed by: Andreas Klemm <andreas@FreeBSD.org>
Diffstat (limited to 'mail')
-rw-r--r--mail/dspam-devel/Makefile264
-rw-r--r--mail/dspam-devel/distinfo4
-rw-r--r--mail/dspam-devel/files/patch-Makefile.in11
-rw-r--r--mail/dspam-devel/files/patch-configure6
-rw-r--r--mail/dspam-devel/pkg-message79
-rw-r--r--mail/dspam-devel/pkg-plist34
6 files changed, 309 insertions, 89 deletions
diff --git a/mail/dspam-devel/Makefile b/mail/dspam-devel/Makefile
index 9c26dc101328..6a3bac9a5e06 100644
--- a/mail/dspam-devel/Makefile
+++ b/mail/dspam-devel/Makefile
@@ -1,24 +1,26 @@
-# New ports collection makefile for: dspam
-# Date created: 3 August 2003
-# Whom: Dominic Marks <dom@wirespeed.org.uk>
+# New ports collection makefile for: dspam-devel
+# Date created: 24 Jun 2004
+# Whom: Ion-Mihai "IOnut" Tetcu <itetcu@people.tecnik93.com>
#
# $FreeBSD$
#
-PORTNAME= dspam
-PORTVERSION= 3.0.0
+PORTNAME= dspam-devel
+PORTVERSION= 3.1.0
CATEGORIES= mail
-MASTER_SITES= http://www.nuclearelephant.com/projects/dspam/sources/
+MASTER_SITES= http://www.nuclearelephant.com/projects/dspam/sources/ \
+ http://people.tecnik93.com/~itetcu/FreeBSD/ports/dspam-devel/sources/
+DISTFILES= dspam-${PORTVERSION}.tar.gz
-MAINTAINER= rob@debank.tv
-COMMENT= A server-side bayesian spam filter
-BROKEN= "port after repo copy from mail/dspam, work in progress"
+MAINTAINER= itetcu@people.tecnik93.com
+COMMENT= Bayesian spam filter - development version
+
+WRKSRC= ${WRKDIR}/dspam-${PORTVERSION}
## debug / log options
-OPTIONS= NO_CONFLICTS "DO NOT conflict with dspam-2.x" off
-OPTIONS+= DEBUG "Enable debug in DSPAM_HOME/dspam.debug" on
-OPTIONS+= VERBOSE_DEBUG "Enable verbose debug" on
-OPTIONS+= USER_LOGGING "Log mail in DSPAM_HOME/data/user/user.log" on
+OPTIONS= DEBUG "Enable debug in DSPAM_HOME/dspam.debug" on
+OPTIONS+= VERBOSE_DEBUG "Enable verbose debug" off
+OPTIONS+= USER_LOGGING "Log mail in DSPAM_HOME/data/user/user.log" off
OPTIONS+= SYSTEM_LOGGING "Log some info DSPAM_HOME/system.log" on
OPTIONS+= SAT "Log spam source addresses to syslog" on
## algorithm options
@@ -46,6 +48,8 @@ OPTIONS+= POSTGRESQL73 "Use PostgreSQL v.7.3 as back-end" off
OPTIONS+= POSTGRESQL74 "Use PostgreSQL v.7.4 as back-end" off
#OPTIONS+= PGSQL_INSTALLED "You have the client installed" on
OPTIONS+= ORACLE "Use Oracle as back-end (BROKEN)" off
+OPTIONS+= BDB4 "Use BDB4 as back-end (not recomanded)" off
+OPTIONS+= SQLITE "Use SQLite as back-end" on
OPTIONS+= VIRT_USERS "Enable virtual users (needs SQL back-end)" off
OPTIONS+= LONG_USERNAMES "Usernames longer that OS supports" off
OPTIONS+= LARGE_SCALE "File structure for large scale" off
@@ -54,8 +58,12 @@ OPTIONS+= SIGNATURE_ATACH "Put server-side signature in mails" off
## MTA and LDA
OPTIONS+= MAILDROP "Use Maildrop as local delivery agent" off
OPTIONS+= PROCMAIL "Use Procmail as local delivery agent" off
+OPTIONS+= CYRUS_LDA "Use Cyrus's 1.6 deliver as LDA" off
+OPTIONS+= CYRUS21_LDA "Use Cyrus's 2.1 deliver as LDA" off
+OPTIONS+= CYRUS22_LDA "Use Cyrus's 2.2 deliver as LDA" off
OPTIONS+= SENDMAIL_LDA "Use Sendmail as local delivery agent" off
OPTIONS+= SENDMAIL "Play nice with sendmail server" off
+OPTIONS+= POSTFIX_MBC "Dspam as mailbox_command in Postfix" off
OPTIONS+= QMAIL "Play nice with Qmail mail server" off
OPTIONS+= BROKEN_ERR_CODES "99=spam, 0=not, other=error (qmailish)" off
OPTIONS+= BROKEN_MTA "Enable if MTA pases ^M to dspam" off
@@ -69,80 +77,90 @@ GNU_CONFIGURE= yes
CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
+CONFLICTS= dspam-2* dspam-3*
+
SED_SCRIPT= -e 's,%%DOCSDIR%%,${DOCSDIR},g' \
-e 's,%%EXAMPLESDIR%%,${EXAMPLESDIR},g' \
- -e 's,%%LOCALBASE%%,${LOCALBASE},g'
+ -e 's,%%LOCALBASE%%,${LOCALBASE},g' \
+ -e 's,%%PREFIX%%,${PREFIX},g'
-WITH_SIGNATURE_LIFE?= 28
+WITH_SIGNATURE_LIFE?= 15
.include <bsd.port.pre.mk>
-.if !defined(WITH_NO_CONFLICTS)
-CONFLICTS= dspam-2*
-.endif
-
-.if defined(WITHOUT_DEBUG)
-CONFIGURE_ARGS+= --disable-debug
-.else
+.if defined(WITH_DEBUG)
CONFIGURE_ARGS+= --enable-debug
+.else
+CONFIGURE_ARGS+= --disable-debug
.endif
-.if defined(WITHOUT_VERBOSE_DEBUG)
-CONFIGURE_ARGS+= --disable-verbose-debug
-.else
+.if defined(WITH_VERBOSE_DEBUG)
CONFIGURE_ARGS+= --enable-verbose-debug
+.else
+CONFIGURE_ARGS+= --disable-verbose-debug
.endif
-.if defined(WITHOUT_SYSTEM_LOGGING)
-CONFIGURE_ARGS+= --disable-system-logging
-.else
+.if defined(WITH_SYSTEM_LOGGING)
CONFIGURE_ARGS+= --enable-logging
+.else
+CONFIGURE_ARGS+= --disable-system-logging
.endif
-.if defined(WITHOUT_USER_LOGGING)
-CONFIGURE_ARGS+= --disable-user-logging
-.else
+.if defined(WITH_USER_LOGGING)
CONFIGURE_ARGS+= --enable-user-logging
+.else
+CONFIGURE_ARGS+= --disable-user-logging
.endif
-.if !defined(WITHOUT_SAT)
+.if defined(WITH_SAT)
CONFIGURE_ARGS+= --enable-source-address-tracking
.endif
-.if defined(WITHOUT_TRAD_BAYES)
-CONFIGURE_ARGS+= --disable-traditional-bayesian
-.else
+.if defined(WITH_TRAD_BAYES)
CONFIGURE_ARGS+= --enable-traditional-bayesian
+HAVE_ALG=yes
+.else
+CONFIGURE_ARGS+= --disable-traditional-bayesian
.endif
-.if defined(WITHOUT_ALT_BAYES)
-CONFIGURE_ARGS+= --disable-alternative-bayesian
-.else
+.if defined(WITH_ALT_BAYES)
CONFIGURE_ARGS+= --enable-alternative-bayesian
+HAVE_ALG=yes
+.else
+CONFIGURE_ARGS+= --disable-alternative-bayesian
.endif
.if defined(WITH_RNB)
CONFIGURE_ARGS+= --enable-robinson
+HAVE_ALG=yes
.else
CONFIGURE_ARGS+= --disable-robinson
.endif
.if defined(WITH_CHI_SQUARE)
CONFIGURE_ARGS+= --enable-robinson
+HAVE_ALG=yes
.else
CONFIGURE_ARGS+= --disable-robinson
.endif
.if defined(WITH_RPV)
CONFIGURE_ARGS+= --enable-robinson-pvalues
+HAVE_ALG=yes
.else
CONFIGURE_ARGS+= --disable-robinson-pvalues
.endif
-.if defined(WITHOUT_TEST_COND)
-CONFIGURE_ARGS+= --disable-test-conditional
-.else
+# redundant with options for BATCH=yes and no OPTIONS defined builds
+.if !defined(HAVE_ALG) && defined(BATCH)
+CONFIGURE_ARGS+= --enable-traditional-bayesian
+CONFIGURE_ARGS+= --enable-alternative-bayesian
+.endif
+
+.if defined(WITH_TEST_COND)
CONFIGURE_ARGS+= --enable-test-conditional
+.else
+CONFIGURE_ARGS+= --disable-test-conditional
.endif
.if defined(WITH_NO_BIAS)
@@ -155,7 +173,6 @@ CONFIGURE_ARGS+= --enable-whitelist
.if defined(WITH_NEURAL_NET)
CONFIGURE_ARGS+= --enable-neural-networking
-#NEED_M_P=. @${TRUE}
.endif
.if defined(WITH_HOMEDIR_DOT)
@@ -194,15 +211,17 @@ CONFIGURE_ARGS+= --with-storage-driver=mysql_drv \
PLIST_SUB+= DB4="@comment "
PLIST_SUB+= MYSQL=""
PLIST_SUB+= PGSQL="@comment "
+PLIST_SUB+= SQLITE="@comment "
SED_SCRIPT+= -e 's,%%MYSQL%%,,g'
SED_SCRIPT+= -e '/%%PGSQL%%/D'
+SED_SCRIPT+= -e '/%%SQLITE%%/D'
.if defined(WITH_MYSQL_COMPRESS)
CONFIGURE_ARGS+= --enable-client-compression
.endif
.endif
.if defined(WITH_POSTGRESQL73)
-LIB_DEPENDS+= pq.3:${PORTSDIR}/databases/postgresql73
+LIB_DEPENDS= pq.3:${PORTSDIR}/databases/postgresql73
#BUILD_DEPENDS= ${LIB_DEPENDS}
CONFIGURE_ARGS+= --with-storage-driver=pgsql_drv \
--with-pgsql-includes=${LOCALBASE}/include \
@@ -210,12 +229,14 @@ CONFIGURE_ARGS+= --with-storage-driver=pgsql_drv \
PLIST_SUB+= DB4="@comment "
PLIST_SUB+= MYSQL="@comment "
PLIST_SUB+= PGSQL=""
+PLIST_SUB+= SQLITE="@comment "
SED_SCRIPT+= -e '/%%MYSQL%%/D'
SED_SCRIPT+= -e 's,%%PGSQL%%,,g'
+SED_SCRIPT+= -e '/%%SQLITE%%/D'
.endif
.if defined(WITH_POSTGRESQL74)
-LIB_DEPENDS+= ecpg.4:${PORTSDIR}/databases/postgresql7
+LIB_DEPENDS= ecpg.4:${PORTSDIR}/databases/postgresql7
#BUILD_DEPENDS= ${LIB_DEPENDS}
CONFIGURE_ARGS+= --with-storage-driver=pgsql_drv \
--with-pgsql-includes=${LOCALBASE}/include \
@@ -223,29 +244,49 @@ CONFIGURE_ARGS+= --with-storage-driver=pgsql_drv \
PLIST_SUB+= DB4="@comment "
PLIST_SUB+= MYSQL="@comment "
PLIST_SUB+= PGSQL=""
+PLIST_SUB+= SQLITE="@comment "
SED_SCRIPT+= -e '/%%MYSQL%%/D'
SED_SCRIPT+= -e 's,%%PGSQL%%,,g'
+SED_SCRIPT+= -e '/%%SQLITE%%/D'
.endif
.if defined(WITH_ORACLE)
-BUILD_DEPENDS+= ${LOCALBASE}/oracle7/rdbms/lib/libnlsrtl3.a:${PORTSDIR}/databases/oracle7-client
+BUILD_DEPENDS= ${LOCALBASE}/oracle7/rdbms/lib/libnlsrtl3.a:\
+ ${PORTSDIR}/databases/oracle7-client
CONFIGURE_ARGS+= --with-storage-driver=ora_drv \
--with-oracle-home= ${LOCALBASE}/oracle7
.endif
-.if defined(WITH_VIRT_USERS)
-CONFIGURE_ARGS+= --enable-virtual-users
-#NEED_M_P=. @${TRUE}
-.endif
-
-.if !(defined(WITH_MYSQL) || defined(WITH_POSTGRESQL73) || defined(WITH_POSTGRESQL74) || defined(WITH_ORACLE))
+.if defined(WITH_BDB)
LIB_DEPENDS+= db41.1:${PORTSDIR}/databases/db41
-CONFIGURE_ARGS+= --with-db4-includes=${LOCALBASE}/include/db41
+CONFIGURE_ARGS+= --with-storage-driver=libdb4_drv \
+ --with-db4-includes=${LOCALBASE}/include/db41
PLIST_SUB+= DB4=""
PLIST_SUB+= MYSQL="@comment "
PLIST_SUB+= PGSQL="@comment "
+PLIST_SUB+= SQLITE="@comment "
+SED_SCRIPT+= -e '/%%MYSQL%%/D'
+SED_SCRIPT+= -e '/%%PGSQL%%/D'
+SED_SCRIPT+= -e '/%%SQLITE%%/D'
+.endif
+
+.if !(defined(WITH_MYSQL) || defined(WITH_POSTGRESQL73) || defined(WITH_POSTGRESQL74) || defined(WITH_ORACLE) || defined(WITH_BDB))
+WITH_SQLITE= on
+LIB_DEPENDS+= sqlite.2:${PORTSDIR}/databases/sqlite
+CONFIGURE_ARGS+= --with-storage-driver=sqlite_drv \
+ --with-sqlite-includes=${LOCALBASE}/include \
+ --with-sqlite-libraries=${LOCALBASE}/lib
+PLIST_SUB+= DB4="@comment "
+PLIST_SUB+= MYSQL="@comment "
+PLIST_SUB+= PGSQL="@comment "
+PLIST_SUB+= SQLITE=""
SED_SCRIPT+= -e '/%%MYSQL%%/D'
SED_SCRIPT+= -e '/%%PGSQL%%/D'
+SED_SCRIPT+= -e 's,%%SQLITE%%,,g'
+.endif
+
+.if defined(WITH_VIRT_USERS)
+CONFIGURE_ARGS+= --enable-virtual-users
.endif
.if defined(WITH_LONG_USERNAMES)
@@ -276,10 +317,35 @@ CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/sbin/sendmail'
.endif
.endif
+.if defined(WITH_CYRUS_LDA)
+RUN_DEPENDS+= ${LOCALBASE}/cyrus/bin/deliver:${PORTSDIR}/mail/cyrus
+CONFIGURE_ARGS+=\
+--with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver -e -r $${sender} -m $${extension} $${user} $$u'
+.endif
+
+.if defined(WITH_CYRUS21_LDA)
+RUN_DEPENDS+= ${LOCALBASE}/cyrus/bin/deliver:${PORTSDIR}/mail/cyrus-imapd2
+CONFIGURE_ARGS+=\
+--with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver -e -r $${sender} -m $${extension} $${user} $$u'
+.endif
+
+.if defined(WITH_CYRUS22_LDA)
+RUN_DEPENDS+= ${LOCALBASE}/cyrus/bin/deliver:${PORTSDIR}/mail/cyrus-imapd22
+CONFIGURE_ARGS+=\
+--with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver -e -r $${sender} -m $${extension} $${user} $$u"
+.endif
+
.if defined(WITH_SENDMAIL)
CONFIGURE_ARGS+= --with-dspam-mode=4511
.endif
+.if defined(WITH_POSTFIX_MBC)
+CONFIGURE_ARGS+= --with-dspam-mode=4511
+SED_SCRIPT+= -e 's,%%POSTFIX_MBC%%,,g'
+.else
+SED_SCRIPT+= -e '/%%POSTFIX_MBC%%/D'
+.endif
+
.if defined(WITH_QMAIL)
CONFIGURE_ARGS+= --with-dspam-mode=4511
.endif
@@ -289,19 +355,19 @@ CONFIGURE_ARGS+= --enable-broken-return-codes
.endif
.if defined(DSPAM_HOME)
-CONFIGURE_ARGS+=--with-dspam-home=${DSPAM_HOME}
+CONFIGURE_ARGS+= --with-dspam-home=${DSPAM_HOME}
.else
-CONFIGURE_ARGS+=--with-dspam-home=${PREFIX}/etc/dspam
+CONFIGURE_ARGS+= --with-dspam-home=${PREFIX}/etc/dspam
+DSPAM_HOME= ${PREFIX}/etc/dspam
.endif
-# --with-dspam-home=DIR Specify directory where per-user dictionaries
-# --with-dspam-home-mode=MODE Set access mode for DSPAM_HOME
-# --with-dspam-home-owner=OWNER Set owner for DSPAM_HOME
-# --with-dspam-home-group=GROUP Set group for DSPAM_HOME
+.if defined(DSPAM_OWNER)
+CONFIGURE_ARGS+= --with-dspam-home-owner=${DSPAM_OWNER}
+.endif
-# --with-dspam-mode=MODE Set access mode for dspam binary
-# --with-dspam-owner=OWNER Set owner for dspam binary
-# --with-dspam-group=GROUP Set group for dspam binary
+.if defined(DSPAM_GROUP)
+CONFIGURE_ARGS+= --with-dspam-home-group=${DSPAM_GROUP}
+.endif
.if defined(WITH_BROKEN_MTA)
CONFIGURE_ARGS+= --enable-broken-mta
@@ -316,21 +382,53 @@ CONFIGURE_ARGS+= --with-quarantine-agent=${QUARANTINE_AGENT}
.endif
.if defined(WITH_CGI)
-RUN_DEPENDS+= ${LOCALBASE}/etc/apache/httpd.conf:${PORTSDIR}/${APACHE_PORT}
+LIB_DEPENDS+= gd.4:${PORTSDIR}/graphics/gd
+RUN_DEPENDS+= ${LOCALBASE}/sbin/apachectl:${PORTSDIR}/${APACHE_PORT}
+RUN_DEPENDS+= ${SITE_PERL}/mach/GD.pm:${PORTSDIR}/graphics/p5-GD
+RUN_DEPENDS+= ${SITE_PERL}/GD/Graph.pm:${PORTSDIR}/graphics/p5-GD-Graph
+RUN_DEPENDS+= ${SITE_PERL}/GD/Graph3d.pm:${PORTSDIR}/graphics/p5-GD-Graph3d
+RUN_DEPENDS+= ${SITE_PERL}/GD/Text.pm:${PORTSDIR}/graphics/p5-GD-TextUtil
+USE_PERL5_RUN= yes
+PLIST_SUB+= CGI=""
+.if !defined(CGI_PATH)
+CGI_PATH= ${PREFIX}/www/vhosts/dspam
+.endif
+SED_SCRIPT+= -e 's,%%CGI%%,,g'
+SED_SCRIPT+= -e 's,%%CGI_PATH%%,${CGI_PATH},g'
+SED_SCRIPT+= -e 's,%%DSPAM_HOME%%,${DSPAM_HOME},g'
+#SED_FILES= ${LS} ${WRKSRC}/cgi/*.pl
+#SED_FILES+= ${LS} $PWRKSRC}/cgi/*.cgi
+.else
+PLIT_SUB+= CGI="@comment "
.endif
-MAN1= dspam.1 dspam_clean.1 dspam_corpus.1 dspam_dump.1 dspam_merge.1 dspam_stats.1
+MAN1= dspam.1 dspam_clean.1 dspam_corpus.1 dspam_dump.1 dspam_merge.1 \
+ dspam_stats.1
DOCS= CHANGELOG README LICENSE RELEASE.NOTES
pre-everything::
- @${SH} ${PKGINSTALL} ${PORTNAME} PRE-INSTALL
-
+ @${ECHO_CMD} "Define vars below before make-ing if you need:"
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} "WITH_SIGNATURE_LIFE (default 15)"
+ @${ECHO_CMD} "DSPAM_OWNER (default: root)"
+ @${ECHO_CMD} "DSPAM_GROUP (default: mail)"
+ @${ECHO_CMD} "DSPAM_HOME (default: ${PREFIX}/etc/dspam)"
+ @${ECHO_CMD} "QUARANTINE_AGENT (default: -)"
+.if defined(WITH_CGI)
+ @${ECHO_CMD} "Define CGI_PATH before make-ing if you need the CGI files"
+ @${ECHO_CMD} "installed in other place that this installation's default"
+ @${ECHO_CMD} "${PREFIX}/www/vhosts/dspam"
+.endif
+ @${ECHO_CMD} ""
+ @${ECHO_CMD} "I hope you selected only 1 database beck-end above"
+ @${ECHO_CMD} ""
+ @sleep 5
post-patch:
@${REINPLACE_CMD} -e 's|%%LIBTOOLFLAGS%%|${LIBTOOLFLAGS}|g ; \
s|-ldb-4.1|-ldb41|g' ${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|' \
- ${WRKSRC}/Makefile.in
+ ${WRKSRC}/Makefile.in
pre-configure:
.if defined(WITH_MAILDROP) && (defined(WITH_PROCMAIL) || defined(WITH_SENDMAIL_LDA))
@@ -345,7 +443,8 @@ pre-configure:
@${ECHO_CMD} "You need MySQL or POSTGRESQL to use neural networking."
@${FALSE}
.endif
-.if defined(WITH_VIRT_USERS) && !(defined(WITH_MYSQL) || defined(WITH_POSTGRESQL) || defined(WITH_ORACLE))
+.if defined(WITH_VIRT_USERS) && !(defined(WITH_MYSQL) || \
+ defined(WITH_POSTGRESQL) || defined(WITH_ORACLE))
@${ECHO_CMD} "You need MySQL, POSTGRESQL or ORACLE for virtual users."
@${FALSE}
.endif
@@ -355,15 +454,38 @@ post-install:
@${MKDIR} ${EXAMPLESDIR}/mysql
cd ${WRKSRC}/tools.mysql_drv && \
${INSTALL_DATA} README *.sql* ${EXAMPLESDIR}/mysql
- ${INSTALL_DATA} ${FILESDIR}/mysql.data ${EXAMPLESDIR}/mysql
- ${INSTALL_DATA} ${FILESDIR}/2x_to_3x_db.sql ${EXAMPLESDIR}/mysql
+ @${INSTALL_DATA} ${FILESDIR}/mysql.data ${EXAMPLESDIR}/mysql
+ @${INSTALL_DATA} ${FILESDIR}/2x_to_3x_db.sql ${EXAMPLESDIR}/mysql
.endif
.if defined(WITH_POSTGRESQL73) || defined(WITH_POSTGRESQL74)
- ${MKDIR} ${EXAMPLESDIR}/pgsql
- cd ${WRKSRC}/tools.pgsql_drv && \
+ @${MKDIR} ${EXAMPLESDIR}/pgsql
+ cd @${WRKSRC}/tools.pgsql_drv && \
${INSTALL_DATA} README *.sql ${EXAMPLESDIR}/pgsql
${INSTALL_DATA} ${FILESDIR}/pgsql.data ${EXAMPLESDIR}/pgsql
.endif
+.if defined(WITH_SQLITE)
+ @${MKDIR} ${EXAMPLESDIR}/sqlite
+ cd ${WRKSRC}/tools.sqlite_drv && \
+ ${INSTALL_DATA} README *.sql ${EXAMPLESDIR}/sqlite
+.endif
+
+.if defined(WITH_CGI)
+.for I in admin.cgi admingraph.cgi configure.pl dspam.cgi graph.cgi
+ @${SED} -i '' -e "s,/usr/bin/perl,${PERL},g" ${WRKSRC}/cgi/${I}
+.endfor
+ cd ${WRKSRC}/cgi && ${MKDIR} ${CGI_PATH} && \
+ ${INSTALL_SCRIPT} *.pl ${CGI_PATH}/ && \
+ ${INSTALL_SCRIPT} *.cgi ${CGI_PATH}
+ cd ${WRKSRC}/cgi && \
+ ${INSTALL_DATA} base.css logo.gif rgb.txt ${CGI_PATH}/
+ cd ${WRKSRC}/cgi && \
+ ${INSTALL_DATA} default.prefs ${CGI_PATH}/default.prefs.sample
+ cd ${WRKSRC}/cgi && \
+ ${INSTALL_DATA} admins ${CGI_PATH}/admins.sample
+ @${MKDIR} ${CGI_PATH}/templates && cd ${WRKSRC}/cgi/templates && \
+ ${INSTALL_DATA} *.html ${CGI_PATH}/templates/
+.endif
+
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
diff --git a/mail/dspam-devel/distinfo b/mail/dspam-devel/distinfo
index fa51ea3a0540..fa7eb0bd0423 100644
--- a/mail/dspam-devel/distinfo
+++ b/mail/dspam-devel/distinfo
@@ -1,2 +1,2 @@
-MD5 (dspam-3.0.0.tar.gz) = f5b568e8fea50faaf4c1fcabee177934
-SIZE (dspam-3.0.0.tar.gz) = 575382
+MD5 (dspam-3.1.0.tar.gz) = 217c622c8eba132756ebc3cac8396897
+SIZE (dspam-3.1.0.tar.gz) = 611220
diff --git a/mail/dspam-devel/files/patch-Makefile.in b/mail/dspam-devel/files/patch-Makefile.in
new file mode 100644
index 000000000000..bffbd6d73240
--- /dev/null
+++ b/mail/dspam-devel/files/patch-Makefile.in
@@ -0,0 +1,11 @@
+--- Makefile.in.orig Thu Jun 24 18:32:38 2004
++++ Makefile.in Thu Jun 24 18:37:09 2004
+@@ -242,7 +242,7 @@
+ man_MANS = dspam.1 dspam_stats.1 dspam_corpus.1 dspam_clean.1 dspam_dump.1 \
+ dspam_merge.1
+
+-pkgconfigdir = $(libdir)/pkgconfig
++pkgconfigdir = $(prefix)/libdata/pkgconfig
+ pkgconfig_DATA = dspam.pc
+ EXTRA_DIST = autogen.sh RELEASE.NOTES CHANGELOG LICENSE example.c \
+ dspam-button.gif dspam.1 dspam_stats.1 dspam_corpus.1 dspam_clean.1 \
diff --git a/mail/dspam-devel/files/patch-configure b/mail/dspam-devel/files/patch-configure
index 7cb007066691..cb3208b2c46a 100644
--- a/mail/dspam-devel/files/patch-configure
+++ b/mail/dspam-devel/files/patch-configure
@@ -1,6 +1,6 @@
---- configure.orig Sat Jul 3 14:18:37 2004
-+++ configure Sat Jul 3 14:18:57 2004
-@@ -19272,7 +19272,8 @@
+--- configure.orig Wed Nov 26 14:35:34 2003
++++ configure Thu Dec 11 14:00:18 2003
+@@ -7548,7 +7548,8 @@
# This can be used to rebuild libtool when needed
diff --git a/mail/dspam-devel/pkg-message b/mail/dspam-devel/pkg-message
index 97706c8c6b14..21f9ffebfce9 100644
--- a/mail/dspam-devel/pkg-message
+++ b/mail/dspam-devel/pkg-message
@@ -1,26 +1,35 @@
---------------------------------------------------------------------
+-------------------------------------------------------------------------------
- See the file %%DOCSDIR%%/README for advice about
- how to configure DSPAM with your MTA. Examples are provided for
- sendmail, postfix, exim and courier MTAs.
+ See the file %%DOCSDIR%%/README for advice about
+ how to configure DSPAM with your MTA and setting up the CGI with Apache.
+ Examples are provided for sendmail, postfix, exim and courier MTAs.
+%%POSTFIX_MBC%%
+%%POSTFIX_MBC%% Quick Postfix setup guide:
+%%POSTFIX_MBC%% Add root, postfix and cgiuser to %%PREFIX%%/etc/dspam/trusted.users
+%%POSTFIX_MBC%% (Do NOT add --user $USER to the call of dspam binary)
+%%POSTFIX_MBC%% In main.cf set
+%%POSTFIX_MBC%% mailbox_command = %%PREFIX%%/bin/dspam --mode=teft --deliver=innocent,spam --feature=chained,noise -d %u
+%%POSTFIX_MBC%% And don't forget to set
+%%POSTFIX_MBC%% %%PREFIX%%/etc/dspam/untrusted.mailer_args
+%%POSTFIX_MBC%% (for mail.local it could be /usr/libexec/mail.local -s %u)
+%%POSTFIX_MBC%%
Note that man entries have been added for all dspam binaries.
-
%%MYSQL%%
-%%MYSQL%% See %%EXAMPLESDIR%%/README
+%%MYSQL%% See %%EXAMPLESDIR%%/mysql/README
%%MYSQL%% for instructions on how to configure MySQL
%%MYSQL%% for use with DSPAM.
%%MYSQL%%
-%%MYSQL%% %%EXAMPLESDIR%%/mysql.data
+%%MYSQL%% %%EXAMPLESDIR%%/mysql/mysql.data
%%MYSQL%% contains an example configuration for use with MySQL.
%%MYSQL%% Edit and install as
-%%MYSQL%% %%LOCALBASE%%/etc/dspam/mysql.data
+%%MYSQL%% %%PREFIX%%/etc/dspam/mysql.data
%%MYSQL%% To modify an 2.x database use and use it with dspam 3.x use:
%%MYSQL%% %%EXAMPLESDIR%%/mysql/2x_to_3x_db.sql
%%MYSQL%%
%%PGSQL%%
-%%PGSQL%% See %%EXAMPLESDIR%%/README
+%%PGSQL%% See %%EXAMPLESDIR%%/pgsql/README
%%PGSQL%% for instructions on how to configure PostrgreSQL
%%PGSQL%% for use with DSPAM.
%%PGSQL%% [ To add a nice tutorial on this ]
@@ -28,7 +37,53 @@
%%PGSQL%% %%EXAMPLESDIR%%/pgsql.data
%%PGSQL%% contains an example configuration for use with PostgreSQL.
%%PGSQL%% Edit and install as
-%%PGSQL%% %%LOCALBASE%%/etc/dspam/pgsql.data
-%%PGSQL%%
+%%PGSQL%% %%PREFIX%%/etc/dspam/pgsql.data
+%%PGSQL%%
+%%SQLITE%%
+%%SQLITE%% See %%EXAMPLESDIR%%/sqlite/README
+%%SQLITE%% for suggestion on SQLite back-end. It should work out-of-the-box.
+%%SQLITE%%
+%%SQLITE%% You'll always want to run dspam_clean -p0 and
+%%SQLITE%% sqlite /path/to/user.sdb < vacuum after a corpusfeed.
+%%SQLITE%% where /path/to/user.sdb would by on a default install:
+%%SQLITE%% %%LOCALBASE%%/etc/dspam/data/user/user.sdb
+%%SQLITE%% There are most likely 70%+ junk tokens that need to be removed.
+%%SQLITE%% This will have a HUGE impact on the disk space your db uses.
+%%SQLITE%%
+%%CGI%%
+%%CGI%% The GCI files had been installed in
+%%CGI%% %%CGI_PATH%%
+%%CGI%% Copy
+%%CGI%% %%CGI_PATH%%/default.prefs.sample
+%%CGI%% to
+%%CGI%% %%CGI_PATH%%/default.prefs
+%%CGI%% and edit it to your needs.
+%%CGI%% If you symlink this file in %%DSPAM_HOME%%/
+%%CGI%% an administrator can edit these options in the DSPAM Admin Suite.
+%%CGI%% Define administrators by copying
+%%CGI%% %%CGI_PATH%%/admins.sample
+%%CGI%% to
+%%CGI%% %%CGI_PATH%%/admins
+%%CGI%% and edit the file to your needs.
+%%CGI%% See %%DOCSDIR%%/README
+%%CGI%% especially the CGI and Trusted Users sections for more info.
+
+ See %%DOCSDIR%%/RELEASE.NOTES
+ for new things in this 3.1.0 and
+ %%DOCSDIR%%/CHANGES
+ for the full list from 3.0.0 stable.
+ Preference extensions are NOT yet integrated in this port,
+ feel free to test and send patches.
+
+ ***************************** WARNING: ***************************************
+ Command-line options (and MySQL database structure) has changed.
+ If you are upgrading from 2.x be sure to change the way you are calling
+ dspam binary (for delivery, submitting fp, etc.), otherwise mail
+ will go to the bit-bucket with NO WARNING.
+ ******************************************************************************
+
+ ------------ Version 3.1.0 is a DEVELOPMENT release. ------------
+ All problems should be reported to the maintainer of the port
+ and dspam development mailing list
---------------------------------------------------------------------
+------------------------------------------------------------------------------
diff --git a/mail/dspam-devel/pkg-plist b/mail/dspam-devel/pkg-plist
index b8fd20d82aa4..e4b6d25179ad 100644
--- a/mail/dspam-devel/pkg-plist
+++ b/mail/dspam-devel/pkg-plist
@@ -1,5 +1,6 @@
bin/dspam
bin/dspam_2sql
+bin/dspam_admin
bin/dspam_clean
bin/dspam_corpus
bin/dspam_crc
@@ -24,8 +25,8 @@ libdata/pkgconfig/dspam.pc
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/RELEASE.NOTES
%%PORTDOCS%%@dirrm %%DOCSDIR%%
-%%MYSQL%%%%EXAMPLESDIR%%/mysql/README
%%MYSQL%%%%EXAMPLESDIR%%/mysql/2x_to_3x_db.sql
+%%MYSQL%%%%EXAMPLESDIR%%/mysql/README
%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql.data
%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects.sql.space.optimized
%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects.sql.speed.optimized
@@ -40,5 +41,36 @@ libdata/pkgconfig/dspam.pc
%%PGSQL%%%%EXAMPLESDIR%%/pgsql/virtual_users.sql
%%PGSQL%%@dirrm %%EXAMPLESDIR%%/pgsql
%%PGSQL%%@dirrm %%EXAMPLESDIR%%
+%%SQLITE%%%%EXAMPLESDIR%%/sqlite/README
+%%SQLITE%%%%EXAMPLESDIR%%/sqlite/purge.sql
+%%SQLITE%%@dirrm %%EXAMPLESDIR%%/sqlite
+%%SQLITE%%@dirrm %%EXAMPLESDIR%%
+%%CGI%%www/vhosts/dspam/admins.sample
+%%CGI%%www/vhosts/dspam/admin.cgi
+%%CGI%%www/vhosts/dspam/admingraph.cgi
+%%CGI%%www/vhosts/dspam/base.css
+%%CGI%%www/vhosts/dspam/configure.pl
+%%CGI%%www/vhosts/dspam/default.prefs.sample
+%%CGI%%www/vhosts/dspam/dspam.cgi
+%%CGI%%www/vhosts/dspam/graph.cgi
+%%CGI%%www/vhosts/dspam/logo.gif
+%%CGI%%www/vhosts/dspam/rgb.txt
+%%CGI%%www/vhosts/dspam/templates/nav_admin_error.html
+%%CGI%%www/vhosts/dspam/templates/nav_admin_preferences.html
+%%CGI%%www/vhosts/dspam/templates/nav_admin_status.html
+%%CGI%%www/vhosts/dspam/templates/nav_admin_user.html
+%%CGI%%www/vhosts/dspam/templates/nav_alerts.html
+%%CGI%%www/vhosts/dspam/templates/nav_analysis.html
+%%CGI%%www/vhosts/dspam/templates/nav_error.html
+%%CGI%%www/vhosts/dspam/templates/nav_history.html
+%%CGI%%www/vhosts/dspam/templates/nav_performance.html
+%%CGI%%www/vhosts/dspam/templates/nav_preferences.html
+%%CGI%%www/vhosts/dspam/templates/nav_quarantine.html
+%%CGI%%www/vhosts/dspam/templates/nav_viewmessage.html
+%%CGI%%@dirrm www/vhosts/dspam/templates
+%%CGI%%@dirrm www/vhosts/dspam
+%%CGI%%@dirrm www/vhosts
+%%CGI%%@unexec rmdir %D/www 2>/dev/null || true
@dirrm include/dspam
@dirrm etc/dspam
+@unexec rmdir %D/libdata/pkgconfig 2>/dev/null || true