# Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/app-text/crm114/crm114-20040212.ebuild,v 1.1 2004/03/22 10:29:09 seemant Exp $ IUSE="nls static" MY_P=${P}-BlameEasterBunny.src S=${WORKDIR}/${MY_P} DESCRIPTION="A powerful text processing tools, mainly used for spam filtering" HOMEPAGE="http://crm114.sourceforge.net/" SRC_URI="mirror://sourceforge/crm114/${MY_P}.tar.gz" SLOT="0" LICENSE="GPL-2" KEYWORDS="~x86" DEPEND=">=sys-apps/sed-4 virtual/glibc net-mail/procmail emacs? ( app-emacs/mew ) !emacs? ( net-mail/metamail ) !static? ( >=dev-libs/tre-0.6.6 )" src_unpack() { unpack ${A} cd ${S} #ln -s ${S}/tre-0.6.6/lib tre sed -i \ -e "s#^CFLAGS.*#CFLAGS+=${CFLAGS} -I.#" \ Makefile if [ `use static` ] ; then sed -i \ -e "s#-ltre#-L${S}/tre-0.6.6/lib/.libs/ -ltre#g" \ Makefile else sed -i \ -e "s#-static##g" \ Makefile fi cd ${S}/tre-0.6.6 chmod +x configure } src_compile() { # Build TRE library. if [ `use static` ] ; then cd ${S}/tre-0.6.6 econf \ `use_enable nls` \ `use_enable static` \ --enable-system-abi \ --disable-profile \ --disable-agrep \ --disable-debug || die emake || die fi # Build crm114 cd ${S} emake || die } src_install() { cd ${S} dobin crm114 cssutil cssdiff cssmerge dosym crm114 /usr/bin/crm dodoc COLOPHON.txt CRM114_Mailfilter_HOWTO.txt FAQ.txt INTRO.txt dodoc QUICKREF.txt classify_details.txt inoc_passwd.txt dodoc knownbugs.txt things_to_do.txt README mkdir ${D}/usr/share/${PN} cp -a *.crm ${D}/usr/share/${PN} cp -a *.cf ${D}/usr/share/${PN} cp -a *.mfp ${D}/usr/share/${PN} } pkg_postinst() { echo einfo "The spam-filter CRM files are installed in /usr/share/${PN}." echo }