|
|
HOMEPAGE="http://dspam.nuclearelephant.com/" | HOMEPAGE="http://dspam.nuclearelephant.com/" |
LICENSE="GPL-2" | LICENSE="GPL-2" |
| |
IUSE="clamav debug large-domain logrotate mysql neural oci8 postgres sqlite virtual-users user-homedirs" |
IUSE="berkdb clamav debug large-domain logrotate mysql neural oci8 postgres sqlite virtual-users user-homedirs" |
DEPEND="clamav? ( >=app-antivirus/clamav-0.86 ) | DEPEND="clamav? ( >=app-antivirus/clamav-0.86 ) |
mysql? ( >=dev-db/mysql-3.23 ) | mysql? ( >=dev-db/mysql-3.23 ) |
sqlite? ( <dev-db/sqlite-3 ) | sqlite? ( <dev-db/sqlite-3 ) |
sqlite3? ( =dev-db/sqlite-3* ) | sqlite3? ( =dev-db/sqlite-3* ) |
postgres? ( >=dev-db/postgresql-7.4.3 ) | postgres? ( >=dev-db/postgresql-7.4.3 ) |
>=sys-libs/db-4.0 |
berkdb? ( >=sys-libs/db-4.0 ) |
" | " |
RDEPEND="sys-process/cronbase | RDEPEND="sys-process/cronbase |
clamav? ( >=app-antivirus/clamav-0.86 ) | clamav? ( >=app-antivirus/clamav-0.86 ) |
|
|
sqlite? ( <dev-db/sqlite-3 ) | sqlite? ( <dev-db/sqlite-3 ) |
sqlite3? ( =dev-db/sqlite-3* ) | sqlite3? ( =dev-db/sqlite-3* ) |
postgres? ( >=dev-db/postgresql-7.4.3 ) | postgres? ( >=dev-db/postgresql-7.4.3 ) |
>=sys-libs/db-4.0 |
berkdb? ( >=sys-libs/db-4.0 ) |
logrotate? ( app-admin/logrotate )" | logrotate? ( app-admin/logrotate )" |
KEYWORDS="~x86 ~ppc ~alpha ~amd64" | KEYWORDS="~x86 ~ppc ~alpha ~amd64" |
SLOT="0" | SLOT="0" |
|
|
| |
pkg_setup() { | pkg_setup() { |
local multiple_dbs="0" | local multiple_dbs="0" |
local supported_dbs="mysql postgres oci8 sqlite sqlite3" |
local supported_dbs="berkdb mysql postgres oci8 sqlite sqlite3" |
for foo in ${supported_dbs}; do | for foo in ${supported_dbs}; do |
if use ${foo}; then | if use ${foo}; then |
let multiple_dbs="((multiple_dbs + 1 ))" | let multiple_dbs="((multiple_dbs + 1 ))" |
|
|
einfo "\`echo \"mail-filter/dspam -mysql postgres -oci8 -sqlite -sqlite3\" >> /etc/portage/package.use\`" | einfo "\`echo \"mail-filter/dspam -mysql postgres -oci8 -sqlite -sqlite3\" >> /etc/portage/package.use\`" |
einfo "to build dspam with Postgres database as your dspam backend." | einfo "to build dspam with Postgres database as your dspam backend." |
) | ) |
echo |
|
ewarn "Waiting 30 seconds before starting..." |
|
ewarn "(Control-C to abort)..." |
|
epause 30 |
|
elif [ "${multiple_dbs}" -eq "0" ]; then | elif [ "${multiple_dbs}" -eq "0" ]; then |
echo | echo |
ewarn "You did not select any SQL based database backend. DSPAM will use" |
ewarn "You did not select any SQL based database backend." |
ewarn "Berkeley DB for storing data. If you don't want that, then enable" |
ewarn "DSPAM will use self-contained Hash driver for storing data." |
ewarn "one of the following USE flags:" |
ewarn "If you don't want that, then enable one of the following" |
ewarn "${supported_dbs}" |
ewarn "USE flags: ${supported_dbs}" |
echo |
|
ewarn "Waiting 30 seconds before starting..." |
|
ewarn "(Control-C to abort)..." |
|
epause 30 |
|
fi | fi |
has_version ">sys-kernel/linux-headers-2.6" || ( | has_version ">sys-kernel/linux-headers-2.6" || ( |
einfo "To use the new DSPAM deamon mode, you need to emerge" | einfo "To use the new DSPAM deamon mode, you need to emerge" |
einfo ">sys-kernel/linux-headers-2.6 and rebuild glibc to support NPTL" | einfo ">sys-kernel/linux-headers-2.6 and rebuild glibc to support NPTL" |
echo |
|
ewarn "Waiting 30 seconds before starting..." |
|
ewarn "(Control-C to abort)..." |
|
epause 30 |
|
) | ) |
if use virtual-users && use user-homedirs ; then | if use virtual-users && use user-homedirs ; then |
ewarn "If the users are virtual, then they probably should not have home directories." | ewarn "If the users are virtual, then they probably should not have home directories." |
|
|
| |
myconf="${myconf} --with-dspam-home=${HOMEDIR}" | myconf="${myconf} --with-dspam-home=${HOMEDIR}" |
myconf="${myconf} --sysconfdir=${CONFDIR}" | myconf="${myconf} --sysconfdir=${CONFDIR}" |
use user-homedirs || myconf="${myconf} --enable-homedir" |
use user-homedirs && myconf="${myconf} --enable-homedir" |
use clamav || myconf="${myconf} --enable-clamav" |
use clamav && myconf="${myconf} --enable-clamav" |
| |
# enables support for debugging (touch /etc/dspam/.debug to turn on) | # enables support for debugging (touch /etc/dspam/.debug to turn on) |
# optional: even MORE debugging output, use with extreme caution! | # optional: even MORE debugging output, use with extreme caution! |
|
|
if (expr ${ORACLE_HOME/*\/} : 10 1>/dev/null 2>&1); then | if (expr ${ORACLE_HOME/*\/} : 10 1>/dev/null 2>&1); then |
myconf="${myconf} --with-oracle-version=10" | myconf="${myconf} --with-oracle-version=10" |
fi | fi |
else |
elif use berkdb ; then |
myconf="${myconf} --with-storage-driver=libdb4_drv" | myconf="${myconf} --with-storage-driver=libdb4_drv" |
|
else |
|
myconf="${myconf} --with-storage-driver=hash_drv" |
fi | fi |
| |
econf ${myconf} || die | econf ${myconf} || die |