summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLim Swee Tat <st_lim@gentoo.org>2004-07-28 17:14:15 +0000
committerLim Swee Tat <st_lim@gentoo.org>2004-07-28 17:14:15 +0000
commitc62d9849d7b620efd90ebefefc8fac2f068961cf (patch)
treee7eb41591aa2e921414233edcab5967ba0c5157c /mail-filter/dspam
parentadded commented config defaults to use jikes compile,added doc use flag, clos... (diff)
downloadgentoo-2-c62d9849d7b620efd90ebefefc8fac2f068961cf.tar.gz
gentoo-2-c62d9849d7b620efd90ebefefc8fac2f068961cf.tar.bz2
gentoo-2-c62d9849d7b620efd90ebefefc8fac2f068961cf.zip
Semi solved bug #57838, and added support for postgres.
Diffstat (limited to 'mail-filter/dspam')
-rw-r--r--mail-filter/dspam/ChangeLog10
-rw-r--r--mail-filter/dspam/Manifest25
-rw-r--r--mail-filter/dspam/dspam-3.1.0_beta11.ebuild72
-rw-r--r--mail-filter/dspam/dspam-3.1.0_beta20.ebuild293
-rw-r--r--mail-filter/dspam/files/digest-dspam-3.1.0_beta201
-rw-r--r--mail-filter/dspam/files/pgsql.data5
6 files changed, 389 insertions, 17 deletions
diff --git a/mail-filter/dspam/ChangeLog b/mail-filter/dspam/ChangeLog
index 5efc40a3f500..a992983c9669 100644
--- a/mail-filter/dspam/ChangeLog
+++ b/mail-filter/dspam/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for mail-filter/dspam
# Copyright 1999-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/ChangeLog,v 1.7 2004/07/21 12:20:00 st_lim Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/ChangeLog,v 1.8 2004/07/28 17:14:15 st_lim Exp $
+
+*dspam-3.1.0_beta20 (29 Jul 2004)
+
+ 29 Jul 2004; Lim Swee Tat <st_lim@gentoo.org> +dspam-3.1.0_beta20.ebuild:
+ Fixed bug #57838.
+ Added dspam-3.1.0.beta.2 as beta20.
+ Added support for postgres, but lacking the postgres database/user creation
+ script.
21 Jul 2004; Lim Swee Tat <st_lim@gentoo.org> dspam-3.0.0.ebuild,
dspam-3.1.0_beta11.ebuild:
diff --git a/mail-filter/dspam/Manifest b/mail-filter/dspam/Manifest
index f5328ee62424..0a8e34d5bb8e 100644
--- a/mail-filter/dspam/Manifest
+++ b/mail-filter/dspam/Manifest
@@ -1,18 +1,21 @@
-MD5 6a3cef2765bb322e5e8ec6d700ad6aeb ChangeLog 1624
MD5 ae3a688715ae77f8c9acfa862adbb8e8 dspam-3.0.0.ebuild 6928
-MD5 02610fe17122bb3a27ca3dcbf7374fcc metadata.xml 311
+MD5 82c7540ff0ff2924b63ff5daa642ff3e dspam-3.1.0_beta20.ebuild 7005
MD5 94b8fae7ce4a9a6e5b38487e4e3cb8cf dspam-3.1.0_beta11.ebuild 7007
-MD5 c12a54112c6fec3530a7b1a368d04ac8 files/README.postfix 309
-MD5 e0469b961385fda4305602dc2519d319 files/README.qmail 2317
-MD5 cd1bdb75fd86304f9453741a910cb8a2 files/crontab.db4 196
+MD5 6a3cef2765bb322e5e8ec6d700ad6aeb ChangeLog 1624
+MD5 02610fe17122bb3a27ca3dcbf7374fcc metadata.xml 311
+MD5 2cd345708a9889a04c472a9e5be7400e files/untrusted.mailer_args 24
+MD5 2a79c945ef6c7e7bd45aa1d46ae99e69 files/mysql_install_db 114
MD5 f2f86e8f7ab440c8537f40fa18a0ee43 files/crontab.mysql 118
MD5 05dce5dc8cf516655657aa2a4cc5f1da files/digest-dspam-3.0.0 63
-MD5 cefc786a1b60f3041eb3972aafb0b543 files/logrotate.dspam 154
+MD5 8b68501138fbe92e10bbd93a03c9f2ab files/upgrade.sql 807
+MD5 cd1bdb75fd86304f9453741a910cb8a2 files/crontab.db4 196
MD5 84ec40b77696359ae49560588db9b948 files/mysql.data 52
-MD5 5bcf982f468f4843ef3aa51213cc0023 files/mysql_create_user.sql 194
-MD5 2a79c945ef6c7e7bd45aa1d46ae99e69 files/mysql_install_db 114
-MD5 9fed58b73e35e02ecc3f9a08dcd94eaa files/mysql_purge_db 73
MD5 e6d1b8232199f288fe75501251ade317 files/trusted.users 19
-MD5 2cd345708a9889a04c472a9e5be7400e files/untrusted.mailer_args 24
-MD5 8b68501138fbe92e10bbd93a03c9f2ab files/upgrade.sql 807
+MD5 ad570a01cdefdc9ac332d57da8433234 files/digest-dspam-3.1.0_beta2 70
+MD5 cefc786a1b60f3041eb3972aafb0b543 files/logrotate.dspam 154
+MD5 e0469b961385fda4305602dc2519d319 files/README.qmail 2317
+MD5 9fed58b73e35e02ecc3f9a08dcd94eaa files/mysql_purge_db 73
MD5 8fce97b718a95e27f75b811cde060f3c files/digest-dspam-3.1.0_beta11 72
+MD5 ad570a01cdefdc9ac332d57da8433234 files/digest-dspam-3.1.0_beta20 70
+MD5 5bcf982f468f4843ef3aa51213cc0023 files/mysql_create_user.sql 194
+MD5 c12a54112c6fec3530a7b1a368d04ac8 files/README.postfix 309
diff --git a/mail-filter/dspam/dspam-3.1.0_beta11.ebuild b/mail-filter/dspam/dspam-3.1.0_beta11.ebuild
index 683acc5bf395..540048100c6a 100644
--- a/mail-filter/dspam/dspam-3.1.0_beta11.ebuild
+++ b/mail-filter/dspam/dspam-3.1.0_beta11.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/dspam-3.1.0_beta11.ebuild,v 1.4 2004/07/21 17:34:21 mr_bones_ Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/dspam-3.1.0_beta11.ebuild,v 1.5 2004/07/28 17:14:15 st_lim Exp $
inherit eutils
@@ -11,12 +11,13 @@ SRC_URI="http://www.nuclearelephant.com/projects/dspam/sources/${PN}-${MY_PV}.ta
HOMEPAGE="http://www.nuclearelephant.com/projects/dspam/index.html"
LICENSE="GPL-2"
-IUSE="debug mysql neural procmail cyrus exim maildrop"
-DEPEND="mysql? ( >=dev-db/mysql-3.23 ) || ( >=sys-libs/db-4.0 )
+IUSE="cyrus debug exim mysql maildrop neural postgres procmail"
+DEPEND="exim? ( >=mail-mta/exim-4.34 )
+ mysql? ( >=dev-db/mysql-3.23 ) || ( >=sys-libs/db-4.0 )
+ maildrop? ( >=mail-filter/maildrop-1.5.3 )
+ postgres? ( >=dev-db/postgresql-7.4.3 )
procmail? ( >=mail-filter/procmail-3.22 )
x86? ( cyrus? ( >=net-mail/cyrus-imapd-2.1.15 ) )
- maildrop? ( >=mail-filter/maildrop-1.5.3 )
- exim? ( >=mail-mta/exim-4.34 )
"
RDEPEND="virtual/cron
app-admin/logrotate"
@@ -32,6 +33,24 @@ CONFIGDIR="${HOMEDIR}/config"
MYSQL_TABLE_TYPE="space.optimized"
pkg_setup() {
+ if use mysql && use postgres; then
+ echo
+ ewarn "You have both \"mysql\" and \"postgres\" in your USE flags."
+ ewarn "Will default to MySQL as your dspam database backend."
+ ewarn "If you want to build with Postgres support; hit Control-C now."
+ ewarn "Change your USE flag -mysql and emerge again."
+ echo
+ has_version ">=sys-apps/portage-2.0.50" && (
+ einfo "It would be best practice to add the set of USE flags that you use for this"
+ einfo "package to the file: /etc/portage/package.use. Example:"
+ einfo "\`echo \"net-mail/dspam -mysql postgres\" >> /etc/portage/package.use\`"
+ einfo "to build dspam with Postgres database as your dspam backend."
+ )
+ echo
+ ewarn "Waiting 30 seconds before starting..."
+ ewarn "(Control-C to abort)..."
+ sleep 30
+ fi
id dspam 2>/dev/null || enewgroup dspam 65532
id dspam 2>/dev/null || enewuser dspam 65532 /bin/bash ${HOMEDIR} dspam
}
@@ -81,6 +100,11 @@ src_compile() {
if use neural ; then
myconf="${myconf} --enable-neural-networking"
fi
+ elif use postgres ; then
+ myconf="${myconf} --with-storage-driver=pgsql_drv"
+ myconf="${myconf} --with-pgsql-includes=/usr/include/postgresql"
+ myconf="${myconf} --with-pgsql-libraries=/usr/lib/postgresql"
+
else
myconf="${myconf} --with-storage-driver=libdb4_drv"
myconf="${myconf} --with-db4-includes=/usr/include"
@@ -173,6 +197,44 @@ src_install () {
einfo "Fresh install: run ${HOMEDIR}/mysql_install_db to setup the dspam database"
einfo "Upgrades from 2.x: See the README for instructions on updating your tables for dspam-3.0"
+ elif use postgres ; then
+ local PASSWORD="${RANDOM}${RANDOM}${RANDOM}${RANDOM}"
+
+ # Replace some variables in the configuration files
+ sed -e "s,@HOMEDIR@,${HOMEDIR},g" \
+ -e "s,@confdir@,${CONFIGDIR},g" \
+ ${FILESDIR}/crontab.mysql > ${T}/dspam.cron
+
+ sed -e "s,@HOSTNAME@,127.0.0.1,g" \
+ -e "s,@PORT@,5432,g" \
+ -e "s,@USERNAME@,dspam,g" \
+ -e "s,@PASSWORD@,${PASSWORD},g" \
+ -e "s,@DATABASE@,dspam,g" \
+ ${FILESDIR}/pgsql.data > ${T}/pgsql.data
+
+ cat ${S}/tools.pgsql_drv/pgsql_objects.sql >> ${T}/pgsql_setup.sql
+
+ sed -e "s,@HOMEDIR@,${HOMEDIR},g" \
+ -e "s,@password@,${PASSWORD},g" \
+ -e "s,@confdir@,${CONFIGDIR},g" \
+ -e "s,mysql_purge,pgsql_purge,g" \
+ ${FILESDIR}/mysql_purge_db > ${T}/pgsql_purge_db
+
+ insinto ${CONFIGDIR}
+ insopts -m644 -o dspam -g dspam
+ doins ${T}/pgsql.data
+ doins ${T}/pgsql_setup.sql
+ doins ${FILESDIR}/upgrade.sql
+ newins tools.pgsql_drv/purge.sql pgsql_purge.sql
+
+ exeinto ${CONFIGDIR}
+ exeopts -m755 -o dspam -g dspam
+ doexe ${T}/pgsql_purge_db
+
+ einfo "Fresh install: You need to set up and install a database called dspam,"
+ einfo "create a user called dspam with rights to the database, and password "
+ einfo "'${PASSWORD}', and then install ${CONFIGDIR}/pgsql_setup.sql on your "
+ einfo "Postgres installation"
else
cp ${FILESDIR}/crontab.db4 ${T}/dspam.cron
fi
diff --git a/mail-filter/dspam/dspam-3.1.0_beta20.ebuild b/mail-filter/dspam/dspam-3.1.0_beta20.ebuild
new file mode 100644
index 000000000000..4c3af2daf727
--- /dev/null
+++ b/mail-filter/dspam/dspam-3.1.0_beta20.ebuild
@@ -0,0 +1,293 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/dspam/dspam-3.1.0_beta20.ebuild,v 1.1 2004/07/28 17:14:15 st_lim Exp $
+
+inherit eutils
+
+MY_PV=${PV/_beta20/.beta.2}
+S=${WORKDIR}/${PN}-${MY_PV}
+DESCRIPTION="A statistical-algorithmic hybrid anti-spam filter"
+SRC_URI="http://www.nuclearelephant.com/projects/dspam/sources/${PN}-${MY_PV}.tar.gz"
+HOMEPAGE="http://www.nuclearelephant.com/projects/dspam/index.html"
+LICENSE="GPL-2"
+
+IUSE="cyrus debug exim mysql maildrop neural postgres procmail"
+DEPEND="exim? ( >=mail-mta/exim-4.34 )
+ mysql? ( >=dev-db/mysql-3.23 ) || ( >=sys-libs/db-4.0 )
+ maildrop? ( >=mail-filter/maildrop-1.5.3 )
+ postgres? ( >=dev-db/postgresql-7.4.3 )
+ procmail? ( >=mail-filter/procmail-3.22 )
+ x86? ( cyrus? ( >=net-mail/cyrus-imapd-2.1.15 ) )
+ "
+RDEPEND="virtual/cron
+ app-admin/logrotate"
+KEYWORDS="~x86 ~ppc"
+SLOT="0"
+
+# some FHS-like structure
+HOMEDIR="/etc/mail/dspam"
+DATADIR="/var/spool/dspam"
+LOGDIR="/var/log/dspam"
+CONFIGDIR="${HOMEDIR}/config"
+
+MYSQL_TABLE_TYPE="space.optimized"
+
+pkg_setup() {
+ if use mysql && use postgres; then
+ echo
+ ewarn "You have both \"mysql\" and \"postgres\" in your USE flags."
+ ewarn "Will default to MySQL as your dspam database backend."
+ ewarn "If you want to build with Postgres support; hit Control-C now."
+ ewarn "Change your USE flag -mysql and emerge again."
+ echo
+ has_version ">=sys-apps/portage-2.0.50" && (
+ einfo "It would be best practice to add the set of USE flags that you use for this"
+ einfo "package to the file: /etc/portage/package.use. Example:"
+ einfo "\`echo \"net-mail/dspam -mysql postgres\" >> /etc/portage/package.use\`"
+ einfo "to build dspam with Postgres database as your dspam backend."
+ )
+ echo
+ ewarn "Waiting 30 seconds before starting..."
+ ewarn "(Control-C to abort)..."
+ sleep 30
+ fi
+ id dspam 2>/dev/null || enewgroup dspam 65532
+ id dspam 2>/dev/null || enewuser dspam 65532 /bin/bash ${HOMEDIR} dspam
+}
+
+src_compile() {
+ local myconf
+ local agent
+
+ # these are the default settings
+ myconf="${myconf} --with-signature-life=14"
+ if use cyrus; then
+ agent="/usr/lib/cyrus/deliver %u"
+ elif use exim; then
+ agent="/usr/sbin/exim -oMr spam-scanned"
+ elif use maildrop; then
+ agent="/usr/bin/maildrop -d %u"
+ elif use procmail; then
+ agent="/usr/bin/procmail"
+ fi
+ myconf="${myconf} --enable-homedir-dotfiles"
+ myconf="${myconf} --enable-spam-subject"
+ myconf="${myconf} --enable-chi-square"
+ myconf="${myconf} --enable-robinson"
+ myconf="${myconf} --enable-robinson-pvalues"
+ myconf="${myconf} --enable-source-address-tracking"
+
+ # ${HOMEDIR}/data is a symlink to ${DATADIR}
+ myconf="${myconf} --with-dspam-home=${HOMEDIR}"
+ myconf="${myconf} --with-dspam-mode=4755"
+ myconf="${myconf} --with-dspam-owner=dspam"
+ myconf="${myconf} --with-dspam-group=dspam"
+ myconf="${myconf} --with-dspam-home-owner=dspam"
+ myconf="${myconf} --with-dspam-home-group=dspam"
+
+ # enables support for debugging (touch /etc/dspam/.debug to turn on)
+ # optional: even MORE debugging output, use with extreme caution!
+ use debug && myconf="${myconf} --enable-debug --enable-verbose-debug"
+
+ # select storage driver
+ if use mysql ; then
+ myconf="${myconf} --with-storage-driver=mysql_drv"
+ myconf="${myconf} --with-mysql-includes=/usr/include/mysql"
+ myconf="${myconf} --with-mysql-libraries=/usr/lib/mysql"
+ myconf="${myconf} --with-client-compression"
+
+ # an experimental feature available with MySQL backend
+ if use neural ; then
+ myconf="${myconf} --enable-neural-networking"
+ fi
+ elif use postgres ; then
+ myconf="${myconf} --with-storage-driver=pgsql_drv"
+ myconf="${myconf} --with-pgsql-includes=/usr/include/postgresql"
+ myconf="${myconf} --with-pgsql-libraries=/usr/lib/postgresql"
+
+ else
+ myconf="${myconf} --with-storage-driver=libdb4_drv"
+ myconf="${myconf} --with-db4-includes=/usr/include"
+ myconf="${myconf} --with-db4-libraries=/usr/lib"
+ fi
+
+ econf ${myconf} \
+ --with-delivery-agent="${agent}" || die
+ emake || die
+
+}
+
+src_install () {
+ # open up perms on /etc/mail/dspam
+ diropts -m0775 -o dspam -g dspam
+ dodir ${HOMEDIR}
+ keepdir ${HOMEDIR}
+
+ # keeps dspam data in /var
+ diropts -m0770 -o dspam -g dspam
+ dodir ${DATADIR}
+ keepdir ${DATADIR}
+
+ # keeps dspam log in /var/log
+ diropts -m0775 -o dspam -g dspam
+ dodir ${LOGDIR}
+ keepdir ${LOGDIR}
+
+ # make install
+ make DESTDIR=${D} install || die
+ chmod 4755 ${D}/usr/bin/dspam
+
+ # documentation
+ dodoc CHANGELOG LICENSE README RELEASE.NOTES
+ dodoc ${FILESDIR}/README.postfix ${FILESDIR}/README.qmail
+ if use mysql ; then
+ newdoc tools.mysql_drv/README README.MYSQL
+ fi
+
+ # install some initial configuration
+ insinto ${HOMEDIR}
+ insopts -m0640 -o dspam -g dspam
+ doins ${FILESDIR}/trusted.users
+ if use cyrus; then
+ echo "/usr/lib/cyrus/deliver %u" > ${T}/untrusted.mailer_args
+ elif use exim; then
+ echo "/usr/sbin/exim -oMr spam-scanned" > ${T}/untrusted.mailer_args
+ elif use courier; then
+ echo "/usr/bin/maildrop -d %u" > ${T}/untrusted.mailer_args
+ elif use procmail; then
+ echo "/usr/bin/procmail -d %u" > ${T}/untrusted.mailer_args
+ fi
+
+ # database related configuration and scripts
+ if use mysql ; then
+ local PASSWORD="${RANDOM}${RANDOM}${RANDOM}${RANDOM}"
+
+ # Replace some variables in the configuration files
+ sed -e "s,@HOMEDIR@,${HOMEDIR},g" \
+ -e "s,@confdir@,${CONFIGDIR},g" \
+ ${FILESDIR}/crontab.mysql > ${T}/dspam.cron
+
+ sed -e "s,@password@,${PASSWORD},g" \
+ ${FILESDIR}/mysql.data > ${T}/mysql.data
+
+ sed -e "s,@password@,${PASSWORD},g" \
+ ${FILESDIR}/mysql_create_user.sql > ${T}/mysql_setup.sql
+ cat ${S}/tools.mysql_drv/mysql_objects.sql.${MYSQL_TABLE_TYPE} >> ${T}/mysql_setup.sql
+
+ sed -e "s,@HOMEDIR@,${HOMEDIR},g" \
+ -e "s,@confdir@,${CONFIGDIR},g" \
+ ${FILESDIR}/mysql_install_db > ${T}/mysql_install_db
+
+ sed -e "s,@HOMEDIR@,${HOMEDIR},g" \
+ -e "s,@password@,${PASSWORD},g" \
+ -e "s,@confdir@,${CONFIGDIR},g" \
+ ${FILESDIR}/mysql_purge_db > ${T}/mysql_purge_db
+
+ insinto ${CONFIGDIR}
+ insopts -m644 -o dspam -g dspam
+ doins ${T}/mysql.data
+ doins ${T}/mysql_setup.sql
+ doins ${FILESDIR}/upgrade.sql
+ newins tools.mysql_drv/purge.sql mysql_purge.sql
+
+ exeinto ${CONFIGDIR}
+ exeopts -m755 -o dspam -g dspam
+ doexe ${T}/mysql_install_db
+ doexe ${T}/mysql_purge_db
+
+ einfo "Fresh install: run ${HOMEDIR}/mysql_install_db to setup the dspam database"
+ einfo "Upgrades from 2.x: See the README for instructions on updating your tables for dspam-3.0"
+ elif use postgres ; then
+ local PASSWORD="${RANDOM}${RANDOM}${RANDOM}${RANDOM}"
+
+ # Replace some variables in the configuration files
+ sed -e "s,@HOMEDIR@,${HOMEDIR},g" \
+ -e "s,@confdir@,${CONFIGDIR},g" \
+ ${FILESDIR}/crontab.mysql > ${T}/dspam.cron
+
+ sed -e "s,@HOSTNAME@,127.0.0.1,g" \
+ -e "s,@PORT@,5432,g" \
+ -e "s,@USERNAME@,dspam,g" \
+ -e "s,@PASSWORD@,${PASSWORD},g" \
+ -e "s,@DATABASE@,dspam,g" \
+ ${FILESDIR}/pgsql.data > ${T}/pgsql.data
+
+ cat ${S}/tools.pgsql_drv/pgsql_objects.sql >> ${T}/pgsql_setup.sql
+
+ sed -e "s,@HOMEDIR@,${HOMEDIR},g" \
+ -e "s,@password@,${PASSWORD},g" \
+ -e "s,@confdir@,${CONFIGDIR},g" \
+ -e "s,mysql_purge,pgsql_purge,g" \
+ ${FILESDIR}/mysql_purge_db > ${T}/pgsql_purge_db
+
+ insinto ${CONFIGDIR}
+ insopts -m644 -o dspam -g dspam
+ doins ${T}/pgsql.data
+ doins ${T}/pgsql_setup.sql
+ doins ${FILESDIR}/upgrade.sql
+ newins tools.pgsql_drv/purge.sql pgsql_purge.sql
+
+ exeinto ${CONFIGDIR}
+ exeopts -m755 -o dspam -g dspam
+ doexe ${T}/pgsql_purge_db
+
+ einfo "Fresh install: You need to set up and install a database called dspam,"
+ einfo "create a user called dspam with rights to the database, and password "
+ einfo "'${PASSWORD}', and then install ${CONFIGDIR}/pgsql_setup.sql on your "
+ einfo "Postgres installation"
+ else
+ cp ${FILESDIR}/crontab.db4 ${T}/dspam.cron
+ fi
+
+ # installs the cron job to the cron directory
+ diropts -m0755 -o dspam -g dspam
+ dodir /etc/cron.daily
+ keepdir /etc/cron.daily
+ exeinto /etc/cron.daily
+ exeopts -m0755 -o dspam -g dspam
+ doexe ${T}/dspam.cron
+
+ # installs the logrotation scripts to the logrotate.d directory
+ diropts -m0755 -o dspam -g dspam
+ dodir /etc/logrotate.d
+ keepdir /etc/logrotate.d
+ insinto /etc/logrotate.d
+ insopts -m0755 -o dspam -g dspam
+ newins ${FILESDIR}/logrotate.dspam dspam
+
+ # Symlinks data to HOMEDIR
+ dosym ${DATADIR} ${HOMEDIR}/data
+
+ # Log files for symlinks
+ diropts -m0755 -o dspam -g dspam
+ dodir ${LOGDIR}
+ keepdir ${LOGDIR}
+ touch ${D}${LOGDIR}/sql.errors
+ touch ${D}${LOGDIR}/system.log
+ touch ${D}${LOGDIR}/dspam.debug
+ touch ${D}${LOGDIR}/dspam.messages
+
+ # dspam still wants to write to a few files in it's home dir
+ dosym ${LOGDIR}/sql.errors ${HOMEDIR}/sql.errors
+ dosym ${LOGDIR}/system.log ${HOMEDIR}/system.log
+ dosym ${LOGDIR}/dspam.debug ${HOMEDIR}/dspam.debug
+ dosym ${LOGDIR}/dspam.messages ${HOMEDIR}/dspam.messages
+}
+
+pkg_postinst() {
+ if use mysql ; then
+ einfo "To setup dspam to run out-of-the-box on your system with a mysql database, run:"
+ einfo "ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config"
+ fi
+ if use exim ; then
+ echo
+ einfo "To use dspam in conjunction with your exim system, you should read the README"
+ fi
+}
+
+pkg_config () {
+ if use mysql ; then
+ ${CONFIGDIR}/mysql_install_db
+ mv ${CONFIGDIR}/mysql.data ${HOMEDIR}
+ fi
+}
diff --git a/mail-filter/dspam/files/digest-dspam-3.1.0_beta20 b/mail-filter/dspam/files/digest-dspam-3.1.0_beta20
new file mode 100644
index 000000000000..69a365bdf523
--- /dev/null
+++ b/mail-filter/dspam/files/digest-dspam-3.1.0_beta20
@@ -0,0 +1 @@
+MD5 cd92bbefafe35cd4ab2a355b345a8945 dspam-3.1.0.beta.2.tar.gz 610727
diff --git a/mail-filter/dspam/files/pgsql.data b/mail-filter/dspam/files/pgsql.data
new file mode 100644
index 000000000000..0799e5e5c410
--- /dev/null
+++ b/mail-filter/dspam/files/pgsql.data
@@ -0,0 +1,5 @@
+@HOSTNAME@
+@PORT@
+@USERNAME@
+@PASSWORD@
+@DATABASE@