View | Details | Raw Unified
Collapse All | Expand All

(-) /usr/portage/mail-filter/dspam/dspam-3.4.0-r1.ebuild (-30 / +18 lines)
 Lines 85-96    Link Here 
	use large-domain && myconf="${myconf} --enable-large-scale" ||\
	use large-domain && myconf="${myconf} --enable-large-scale" ||\
	    myconf="${myconf} --enable-domain-scale"
	    myconf="${myconf} --enable-domain-scale"
	myconf="${myconf} --with-dspam-home=${HOMEDIR}"
	myconf="${myconf} --with-dspam-mode=4755"
	myconf="${myconf} --with-dspam-mode=4755"
	myconf="${myconf} --with-dspam-owner=dspam"
	myconf="${myconf} --with-dspam-owner=dspam"
	myconf="${myconf} --with-dspam-group=dspam"
	myconf="${myconf} --with-dspam-group=dspam"
	myconf="${myconf} --sysconfdir=${HOMEDIR}"
	myconf="${myconf} --sysconfdir=${HOMEDIR}"
	myconf="${myconf} --with-logdir=${LOGDIR}"
	myconf="${myconf} --with-logdir=${LOGDIR}"
	use virtual-users || myconf="${myconf} --with-dspam-home=${HOMEDIR}"
	use virtual-users || myconf="${myconf} --enable-homedir"
	# 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!
 Lines 107-113    Link Here 
			myconf="${myconf} --enable-daemon"
			myconf="${myconf} --enable-daemon"
		fi
		fi
		use virtual-users && myconf="${myconf} --enable-virtual-users-users"
		use virtual-users && myconf="${myconf} --enable-virtual-users"
		# an experimental feature available with MySQL and PgSQL backend
		# an experimental feature available with MySQL and PgSQL backend
		use neural && myconf="${myconf} --enable-neural-networking"
		use neural && myconf="${myconf} --enable-neural-networking"
	elif use postgres ; then
	elif use postgres ; then
 Lines 120-132    Link Here 
			myconf="${myconf} --enable-daemon"
			myconf="${myconf} --enable-daemon"
		fi
		fi
		use virtual-users && myconf="${myconf} --enable-virtual-users-users"
		use virtual-users && myconf="${myconf} --enable-virtual-users"
		# an experimental feature available with MySQL and PgSQL backend
		# an experimental feature available with MySQL and PgSQL backend
		use neural && myconf="${myconf} --enable-neural-networking"
		use neural && myconf="${myconf} --enable-neural-networking"
	elif use oci8 ; then
	elif use oci8 ; then
		myconf="${myconf} --with-storage-driver=ora_drv"
		myconf="${myconf} --with-storage-driver=ora_drv"
		myconf="${myconf} --with-oracle-home=${ORACLE_HOME}"
		myconf="${myconf} --with-oracle-home=${ORACLE_HOME}"
		myconf="${myconf} --enable-virtual-users-users"
		myconf="${myconf} --enable-virtual-users"
		# I am in no way a Oracle specialist. If someone knows
		# I am in no way a Oracle specialist. If someone knows
		# how to query the version of Oracle, then let me know.
		# how to query the version of Oracle, then let me know.
 Lines 135-144    Link Here 
		fi
		fi
	elif use sqlite3 ; then
	elif use sqlite3 ; then
		myconf="${myconf} --with-storage-driver=sqlite3_drv"
		myconf="${myconf} --with-storage-driver=sqlite3_drv"
		myconf="${myconf} --enable-virtual-users-users"
		myconf="${myconf} --enable-virtual-users"
	elif use sqlite ; then
	elif use sqlite ; then
		myconf="${myconf} --with-storage-driver=sqlite_drv"
		myconf="${myconf} --with-storage-driver=sqlite_drv"
		myconf="${myconf} --enable-virtual-users-users"
		myconf="${myconf} --enable-virtual-users"
	else
	else
		myconf="${myconf} --with-storage-driver=libdb4_drv"
		myconf="${myconf} --with-storage-driver=libdb4_drv"
	fi
	fi
 Lines 158-164    Link Here 
	# open up perms on /etc/mail/dspam
	# open up perms on /etc/mail/dspam
	diropts -m0775 -o dspam -g dspam
	diropts -m0775 -o dspam -g dspam
	dodir ${HOMEDIR}
	dodir ${HOMEDIR}
	keepdir ${HOMEDIR}
	# keeps dspam data in /var
	# keeps dspam data in /var
	diropts -m0775 -o dspam -g dspam
	diropts -m0775 -o dspam -g dspam
 Lines 168-174    Link Here 
	# keeps dspam log in /var/log
	# keeps dspam log in /var/log
	diropts -m0775 -o dspam -g dspam
	diropts -m0775 -o dspam -g dspam
	dodir ${LOGDIR}
	dodir ${LOGDIR}
	keepdir ${LOGDIR}
	insinto ${LOGDIR}
	touch ${T}/empty.file
	touch ${T}/empty.file
	newins ${T}/empty.file system.log
	newins ${T}/empty.file system.log
	dosym ${LOGDIR}/system.log ${HOMEDIR}/system.log
	dosym ${LOGDIR}/system.log ${HOMEDIR}/system.log
 Lines 177-203    Link Here 
	dosym ${DATADIR} ${HOMEDIR}/data
	dosym ${DATADIR} ${HOMEDIR}/data
	# make install
	# make install
	sed -e 's/rm -f ..mandir.\(.*\)/rm -f ${D}${mandir}\1/g' \
		-e 's/ln -s ..mandir.\(.*\) ..mandir.\(.*3\)/ln -s ${mandir}\1.gz ${D}${mandir}\2.gz/g' \
		-i Makefile
	make DESTDIR=${D} install || die
	make DESTDIR=${D} install || die
	chmod 4755 ${D}/usr/bin/dspam
	chmod 4755 ${D}/usr/bin/dspam
	chmod 4755 ${D}/usr/bin/dspam_stats
	chmod 4755 ${D}/usr/bin/dspam_stats
	# documentation
	# documentation
	dodoc CHANGELOG LICENSE README* RELEASE.NOTES UPGRADING
	dodoc CHANGELOG LICENSE README* RELEASE.NOTES UPGRADING
	dodoc ${DISTDIR}/dspam_sa_trainer.tar.gz
	docinto doc
	dodoc doc/*.txt
	docinto gentoo
	dodoc ${FILESDIR}/README.postfix ${FILESDIR}/README.qmail
	dodoc ${FILESDIR}/README.postfix ${FILESDIR}/README.qmail
	if use mysql; then
		dodoc src/tools.mysql_drv/README
	elif use postgres ; then
		dodoc src/tools.pgsql_drv/README
	elif use oci8 ; then
		dodoc src/tools.ora_drv/README
	elif use sqlite || sqlite3 ; then
		dodoc src/tools.sqlite_drv/README
	fi
	doman man/dspam*
	doman man/dspam*
	dodoc ${DISTDIR}/dspam_sa_trainer.tar.gz
	# build some initial configuration data
	# build some initial configuration data
	cp src/dspam.conf ${T}/dspam.conf
	cp src/dspam.conf ${T}/dspam.conf
 Lines 272-278    Link Here 
		newins src/tools.mysql_drv/mysql_objects-space.sql mysql_objects-space.sql
		newins src/tools.mysql_drv/mysql_objects-space.sql mysql_objects-space.sql
		newins src/tools.mysql_drv/mysql_objects-speed.sql mysql_objects-speed.sql
		newins src/tools.mysql_drv/mysql_objects-speed.sql mysql_objects-speed.sql
		newins src/tools.mysql_drv/mysql_objects-4.1.sql mysql_objects-4.1.sql
		newins src/tools.mysql_drv/mysql_objects-4.1.sql mysql_objects-4.1.sql
		newins src/tools.mysql_drv/virtual-users_users.sql mysql_virtual-users_users.sql
		newins src/tools.mysql_drv/virtual_users.sql mysql_virtual_users.sql
		newins src/tools.mysql_drv/neural.sql mysql_neural.sql
		newins src/tools.mysql_drv/neural.sql mysql_neural.sql
		newins src/tools.mysql_drv/purge.sql mysql_purge.sql
		newins src/tools.mysql_drv/purge.sql mysql_purge.sql
		newins src/tools.mysql_drv/purge-4.1.sql mysql_purge-4.1.sql
		newins src/tools.mysql_drv/purge-4.1.sql mysql_purge-4.1.sql
 Lines 308-314    Link Here 
		insopts -m644 -o dspam -g dspam
		insopts -m644 -o dspam -g dspam
		doins ${T}/pgsql.data
		doins ${T}/pgsql.data
		newins src/tools.pgsql_drv/pgsql_objects.sql pgsql_objects.sql
		newins src/tools.pgsql_drv/pgsql_objects.sql pgsql_objects.sql
		newins src/tools.pgsql_drv/virtual-users_users.sql pgsql_virtual-users_users.sql
		newins src/tools.pgsql_drv/virtual_users.sql pgsql_virtual_users.sql
		newins src/tools.pgsql_drv/purge.sql pgsql_purge.sql
		newins src/tools.pgsql_drv/purge.sql pgsql_purge.sql
	elif use oci8 ; then
	elif use oci8 ; then
 Lines 339-345    Link Here 
		insopts -m644 -o dspam -g dspam
		insopts -m644 -o dspam -g dspam
		doins ${T}/oracle.data
		doins ${T}/oracle.data
		newins src/tools.ora_drv/oral_objects.sql ora_objects.sql
		newins src/tools.ora_drv/oral_objects.sql ora_objects.sql
		newins src/tools.ora_drv/virtual-users_users.sql ora_virtual-users_users.sql
		newins src/tools.ora_drv/virtual_users.sql ora_virtual_users.sql
		newins src/tools.ora_drv/purge.sql ora_purge.sql
		newins src/tools.ora_drv/purge.sql ora_purge.sql
	elif use sqlite || sqlite3 ; then
	elif use sqlite || sqlite3 ; then
		insinto ${HOMEDIR}
		insinto ${HOMEDIR}
 Lines 358-364    Link Here 
	# -> The documentation is wrong! The files need to be in ./txt
	# -> The documentation is wrong! The files need to be in ./txt
	diropts -m0775 -o dspam -g dspam
	diropts -m0775 -o dspam -g dspam
	dodir ${HOMEDIR}/txt
	dodir ${HOMEDIR}/txt
	keepdir ${HOMEDIR}/txt
	insinto ${HOMEDIR}/txt
	insinto ${HOMEDIR}/txt
	insopts -m644 -o dspam -g dspam
	insopts -m644 -o dspam -g dspam
	doins ${S}/txt/*.txt
	doins ${S}/txt/*.txt
 Lines 373-379    Link Here 
	# logrotation scripts
	# logrotation scripts
	diropts -m0755 -o dspam -g dspam
	diropts -m0755 -o dspam -g dspam
	dodir /etc/logrotate.d
	dodir /etc/logrotate.d
	keepdir /etc/logrotate.d
	insinto /etc/logrotate.d
	insinto /etc/logrotate.d
	insopts -m0755 -o dspam -g dspam
	insopts -m0755 -o dspam -g dspam
	newins ${FILESDIR}/logrotate.dspam dspam
	newins ${FILESDIR}/logrotate.dspam dspam
 Lines 381-387    Link Here 
	# dspam cron job
	# dspam cron job
	diropts -m0755 -o dspam -g dspam
	diropts -m0755 -o dspam -g dspam
	dodir /etc/cron.daily
	dodir /etc/cron.daily
	keepdir /etc/cron.daily
	exeinto /etc/cron.daily
	exeinto /etc/cron.daily
	exeopts -m0755 -o dspam -g dspam
	exeopts -m0755 -o dspam -g dspam
	doexe ${FILESDIR}/dspam.cron
	doexe ${FILESDIR}/dspam.cron
 Lines 448-455    Link Here 
			/usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${HOMEDIR}/mysql_objects-speed.sql
			/usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${HOMEDIR}/mysql_objects-speed.sql
		fi
		fi
		einfo "Creating DSPAM MySQL database for virtual-users users"
		einfo "Creating DSPAM MySQL database for virtual users"
		/usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${HOMEDIR}/mysql_virtual-users_users.sql
		/usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${HOMEDIR}/mysql_virtual_users.sql
		if use neural ; then
		if use neural ; then
			/usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${HOMEDIR}/mysql_neural.sql
			/usr/bin/mysql -u root -p ${DSPAM_MySQL_DB} < ${HOMEDIR}/mysql_neural.sql
 Lines 476-482    Link Here 
		einfo "Creating DSPAM PostgreSQL tables"
		einfo "Creating DSPAM PostgreSQL tables"
		PGUSER=${DSPAM_PgSQL_USER} PGPASSWORD=${DSPAM_PgSQL_PWD} /usr/bin/psql -d ${DSPAM_PgSQL_DB} -U ${DSPAM_PgSQL_USER} -f ${HOMEDIR}/pgsql_objects.sql 1>/dev/null 2>&1
		PGUSER=${DSPAM_PgSQL_USER} PGPASSWORD=${DSPAM_PgSQL_PWD} /usr/bin/psql -d ${DSPAM_PgSQL_DB} -U ${DSPAM_PgSQL_USER} -f ${HOMEDIR}/pgsql_objects.sql 1>/dev/null 2>&1
		PGUSER=${DSPAM_PgSQL_USER} PGPASSWORD=${DSPAM_PgSQL_PWD} /usr/bin/psql -d ${DSPAM_PgSQL_DB} -U ${DSPAM_PgSQL_USER} -f ${HOMEDIR}/pgsql_virtual-users_users.sql 1>/dev/null 2>&1
		PGUSER=${DSPAM_PgSQL_USER} PGPASSWORD=${DSPAM_PgSQL_PWD} /usr/bin/psql -d ${DSPAM_PgSQL_DB} -U ${DSPAM_PgSQL_USER} -f ${HOMEDIR}/pgsql_virtual_users.sql 1>/dev/null 2>&1
	elif use oci8 ; then
	elif use oci8 ; then
		[[ -f ${HOMEDIR}/oracle.data ]] && mv -f ${HOMEDIR}/oracle.data ${HOMEDIR}
		[[ -f ${HOMEDIR}/oracle.data ]] && mv -f ${HOMEDIR}/oracle.data ${HOMEDIR}