# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/mail-filter/spamassassin/spamassassin-2.63.ebuild,v 1.4 2004/06/24 22:22:23 agriffis Exp $ inherit perl-module DESCRIPTION="SpamAssassin is an extensible email filter which is used to identify spam." HOMEPAGE="http://spamassassin.apache.org/" LICENSE="Apache-2.0" MY_P=Mail-SpamAssassin-`echo ${PV} | tr _ -` S=${WORKDIR}/`echo ${MY_P} | sed -e 's/-pre.$//'` SRC_URI="http://old.spamassassin.org/devel/${MY_P}.tar.bz2" SLOT="0" KEYWORDS="~x86 ~ppc ~sparc ~alpha ~hppa ~mips ~ia64 ~amd64" IUSE="berkdb ssl qmail" DEPEND="|| ( >=dev-lang/perl-5.8.2-r1 ( >=dev-perl/ExtUtils-MakeMaker-6.11-r1 >=dev-perl/File-Spec-0.8 dev-perl/Time-Local dev-perl/Getopt-Long ) ) dev-perl/Storable >=dev-perl/PodParser-1.22 >=dev-perl/HTML-Parser-3.31 >=dev-perl/Net-DNS-0.34 dev-perl/Digest-SHA1 ssl? ( dev-perl/IO-Socket-SSL dev-libs/openssl ) berkdb? ( dev-perl/DB_File )" # The default SpamAssassin config dir is /etc/mail/spamassassin which # clashes with the default sendmail config dir /etc/mail. myconf="CONFDIR=/etc/spamassassin" # If ssl is enabled, spamc can be built with ssl support if use ssl; then myconf="${myconf} ENABLE_SSL=yes" else myconf="${myconf} ENABLE_SSL=no" fi # if you are going to enable taint mode, make sure that the bug where # spamd doesn't start when the PATH contains . is addressed, and make # sure you deal with versions of razor <2.36-r1 not being taint-safe. # and # . myconf="${myconf} PERL_TAINT=no" # No settings needed for 'make all'. mymake="" # Neither for 'make install'. myinst="" # Some more files to be installed (README* and Changes are already # included per default) mydoc="LICENSE COPYRIGHT TRADEMARK CREDITS INSTALL UPGRADE BUGS USAGE procmailrc.example sample-nonspam.txt sample-spam.txt" use qmail && mydoc="${mydoc} spamc/README.qmail" src_compile() { export PERL_MM_USE_DEFAULT=1 perl-module_src_prep make spamc/Makefile perl-module_src_compile if use qmail; then make spamc/qmail-spamc fi } src_install () { perl-module_src_install dodir /usr/sbin mv ${D}/usr/bin/spamd ${D}/usr/sbin/spamd if use qmail; then into /usr dobin spamc/qmail-spamc fi # Add the init and config scripts. dodir /etc/init.d /etc/conf.d insinto /etc/init.d newins ${FILESDIR}/3.0.0-spamd.init spamd fperms 755 /etc/init.d/spamd insinto /etc/conf.d newins ${FILESDIR}/3.0.0-spamd.conf spamd } pkg_postinst() { perl-module_pkg_postinst if ! has_version "dev-perl/DB_File"; then einfo "The Bayes backend requires the Berkeley DB to store its data. You" einfo "need to emerge dev-perl/DB_File or USE=berkdb to make it available." fi if has_version "mail-filter/razor"; then if ! has_version ">=net-mail/razor-2.40"; then ewarn "You have $(best_version mail-filter/razor) installed but SpamAssassin" ewarn "requires at least version 2.40, version 2.61 or later is recommended." elif ! has_version ">=net-mail/razor-2.61"; then ewarn "You have $(best_version mail-filter/razor) installed but SpamAssassin" ewarn "recommends at least version 2.61." fi fi einfo einfo "Please read the file" einfo " /usr/share/doc/${P}/INSTALL.gz" einfo "to find out which optional modules you need to install to enable" einfo "additional features which depend on them." einfo }