Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 84639
Collapse All | Expand All

(-)dspam-3.4_rc2.ebuild (-6 / +29 lines)
Lines 4-10 Link Here
4
4
5
inherit eutils
5
inherit eutils
6
6
7
MY_PV=${PV/_rc/.rc}
7
MY_PV=${PV/_p/.pr}
8
S=${WORKDIR}/${PN}-${MY_PV}
8
S=${WORKDIR}/${PN}-${MY_PV}
9
DESCRIPTION="A statistical-algorithmic hybrid anti-spam filter"
9
DESCRIPTION="A statistical-algorithmic hybrid anti-spam filter"
10
SRC_URI="http://dspam.nuclearelephant.com/sources/${PN}-${MY_PV}.tar.gz
10
SRC_URI="http://dspam.nuclearelephant.com/sources/${PN}-${MY_PV}.tar.gz
Lines 12-18 Link Here
12
HOMEPAGE="http://dspam.nuclearelephant.com/"
12
HOMEPAGE="http://dspam.nuclearelephant.com/"
13
LICENSE="GPL-2"
13
LICENSE="GPL-2"
14
14
15
IUSE="debug mysql neural oci8 postgres sqlite large-domain"
15
IUSE="debug mysql neural oci8 postgres sqlite sqlite3 large-domain"
16
DEPEND="mysql? ( >=dev-db/mysql-3.23 )
16
DEPEND="mysql? ( >=dev-db/mysql-3.23 )
17
		sqlite? ( <dev-db/sqlite-3 )
17
		sqlite? ( <dev-db/sqlite-3 )
18
		sqlite3? ( >=dev-db/sqlite-3 )
18
		sqlite3? ( >=dev-db/sqlite-3 )
Lines 33-41 Link Here
33
	if (use mysql && use postgres) || \
33
	if (use mysql && use postgres) || \
34
		(use mysql && use oci8) || \
34
		(use mysql && use oci8) || \
35
		(use mysql && use sqlite) || \
35
		(use mysql && use sqlite) || \
36
		(use mysql && use sqlite3) || \
36
		(use postgres && use oci8) || \
37
		(use postgres && use oci8) || \
37
		(use postgres && use sqlite) || \
38
		(use postgres && use sqlite) || \
38
		(use sqlite && use oci8); then
39
		(use postgres && use sqlite3) || \
40
		(use sqlite && use oci8) || \
41
		(use sqlite3 && use oci8); then
39
		echo
42
		echo
40
		ewarn "You have two of either \"mysql\", \"postgres\", \"oci8\", \"sqlite\" or \"sqlite3\" in your USE flags."
43
		ewarn "You have two of either \"mysql\", \"postgres\", \"oci8\", \"sqlite\" or \"sqlite3\" in your USE flags."
41
		ewarn "Will default to MySQL as your dspam database backend."
44
		ewarn "Will default to MySQL as your dspam database backend."
Lines 45-51 Link Here
45
		has_version ">=sys-apps/portage-2.0.50" && (
48
		has_version ">=sys-apps/portage-2.0.50" && (
46
		einfo "It would be best practice to add the set of USE flags that you use for this"
49
		einfo "It would be best practice to add the set of USE flags that you use for this"
47
		einfo "package to the file: /etc/portage/package.use. Example:"
50
		einfo "package to the file: /etc/portage/package.use. Example:"
48
		einfo "\`echo \"net-mail/dspam -mysql postgres -oci8 -sqlite -sqlite3\" >> /etc/portage/package.use\`"
51
		einfo "\`echo \"mail-filter/dspam -mysql postgres -oci8 -sqlite -sqlite3\" >> /etc/portage/package.use\`"
49
		einfo "to build dspam with Postgres database as your dspam backend."
52
		einfo "to build dspam with Postgres database as your dspam backend."
50
		)
53
		)
51
		echo
54
		echo
Lines 62-72 Link Here
62
65
63
	# these are the default settings
66
	# these are the default settings
64
	#myconf="${myconf} --enable-daemon"
67
	#myconf="${myconf} --enable-daemon"
65
	#myconf="${myconf} --enable-nodalcore"
66
	myconf="${myconf} --enable-homedir"
68
	myconf="${myconf} --enable-homedir"
67
	myconf="${myconf} --enable-long-username"
69
	myconf="${myconf} --enable-long-username"
68
	myconf="${myconf} --enable-robinson"
70
	# Note: The author recommends that if you enable chi square,
71
	#       you also DISABLE graham and burton bayesian tests.
69
	#myconf="${myconf} --enable-chi-square"
72
	#myconf="${myconf} --enable-chi-square"
73
	#myconf="${myconf} --disable-graham-bayesian --disable-burton-bayesian"
70
	#myconf="${myconf} --enable-robinson-pvalues"
74
	#myconf="${myconf} --enable-robinson-pvalues"
71
	use large-domain && myconf="${myconf} --enable-large-scale" ||\
75
	use large-domain && myconf="${myconf} --enable-large-scale" ||\
72
		myconf="${myconf} --enable-domain-scale"
76
		myconf="${myconf} --enable-domain-scale"
Lines 115-120 Link Here
115
			--with-oracle-version=MAJOR
119
			--with-oracle-version=MAJOR
116
			myconf="${myconf} --with-oracle-version=10"
120
			myconf="${myconf} --with-oracle-version=10"
117
		fi
121
		fi
122
	elif use sqlite3 ; then
123
		myconf="${myconf} --with-storage-driver=sqlite3_drv"
124
		myconf="${myconf} --enable-virtual-users"
118
	elif use sqlite ; then
125
	elif use sqlite ; then
119
		myconf="${myconf} --with-storage-driver=sqlite_drv"
126
		myconf="${myconf} --with-storage-driver=sqlite_drv"
120
		myconf="${myconf} --enable-virtual-users"
127
		myconf="${myconf} --enable-virtual-users"
Lines 152-157 Link Here
152
		-i Makefile
158
		-i Makefile
153
	make DESTDIR=${D} install || die
159
	make DESTDIR=${D} install || die
154
	chmod 4755 ${D}/usr/bin/dspam
160
	chmod 4755 ${D}/usr/bin/dspam
161
	chmod 4755 ${D}/usr/bin/dspam_stats
155
162
156
	# documentation
163
	# documentation
157
	if use mysql; then
164
	if use mysql; then
Lines 282-287 Link Here
282
	exeopts -m0755 -o dspam -g dspam
289
	exeopts -m0755 -o dspam -g dspam
283
	doexe ${FILESDIR}/dspam.cron
290
	doexe ${FILESDIR}/dspam.cron
284
291
292
	# installs the notification messages
293
	diropts -m0775 -o dspam -g dspam
294
	dodir ${HOMEDIR}/txt
295
	keepdir ${HOMEDIR}/txt
296
	insinto ${HOMEDIR}/txt
297
	insopts -m644 -o dspam -g dspam
298
	for foo in ${S}/txt/*.txt; do
299
		if [ ! -f "$(basename ${foo})" ]; then
300
			doins ${foo}
301
		fi
302
	done
303
285
	# dspam enviroment
304
	# dspam enviroment
286
	echo -ne "CONFIG_PROTECT_MASK=\"${HOMEDIR}\"\n\n" > ${T}/40dspam
305
	echo -ne "CONFIG_PROTECT_MASK=\"${HOMEDIR}\"\n\n" > ${T}/40dspam
287
	doenvd ${T}/40dspam || die
306
	doenvd ${T}/40dspam || die
Lines 377-382 Link Here
377
		/usr/bin/psql -d ${DSPAM_PgSQL_DB} -U postgres -c "GRANT ALL PRIVILEGES ON SCHEMA public TO ${DSPAM_PgSQL_USER};" 1>/dev/null 2>&1
396
		/usr/bin/psql -d ${DSPAM_PgSQL_DB} -U postgres -c "GRANT ALL PRIVILEGES ON SCHEMA public TO ${DSPAM_PgSQL_USER};" 1>/dev/null 2>&1
378
	elif use oci8 ; then
397
	elif use oci8 ; then
379
		[[ -f ${HOMEDIR}/oracle.data ]] && mv -f ${HOMEDIR}/oracle.data ${HOMEDIR}
398
		[[ -f ${HOMEDIR}/oracle.data ]] && mv -f ${HOMEDIR}/oracle.data ${HOMEDIR}
399
	elif use sqlite3 ; then
400
		einfo "sqlite3_drv will automatically create the necessary database"
401
		einfo "objects for each user upon first use of DSPAM by that user."
380
	elif use sqlite ; then
402
	elif use sqlite ; then
381
		einfo "sqlite_drv will automatically create the necessary database"
403
		einfo "sqlite_drv will automatically create the necessary database"
382
		einfo "objects for each user upon first use of DSPAM by that user."
404
		einfo "objects for each user upon first use of DSPAM by that user."

Return to bug 84639