/[gentoo-x86]/app-text/crm114/crm114-20041231.ebuild
Gentoo

Contents of /app-text/crm114/crm114-20041231.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.8 - (show annotations) (download)
Sat Aug 1 17:55:38 2009 UTC (9 years, 3 months ago) by darkside
Branch: MAIN
CVS Tags: HEAD
Changes since 1.7: +1 -1 lines
FILE REMOVED
remove old
(Portage version: 2.1.6.13/cvs/Linux x86_64)

1 # Copyright 1999-2008 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-text/crm114/crm114-20041231.ebuild,v 1.7 2008/01/23 03:26:03 steev Exp $
4
5 inherit eutils
6
7 IUSE="nls static normalizemime mew mimencode"
8
9 MY_P="${P}.BlameSanAndreas.src"
10 S=${WORKDIR}/${MY_P}
11 DESCRIPTION="A powerful text processing tool, mainly used for spam filtering"
12 HOMEPAGE="http://crm114.sourceforge.net/"
13 SRC_URI="http://crm114.sourceforge.net/${MY_P}.tar.gz"
14
15 SLOT="0"
16 LICENSE="GPL-2"
17 KEYWORDS="amd64 ppc ~x86"
18
19 TREVERS="0.7.2"
20
21 DEPEND=">=sys-apps/sed-4
22 virtual/libc
23 mail-filter/procmail
24 normalizemime? ( mail-filter/normalizemime )
25 mew? ( app-emacs/mew )
26 mimencode? ( net-mail/metamail )
27 !static? ( >=dev-libs/tre-${TREVERS} )"
28
29 src_unpack() {
30 unpack ${A}
31 cd "${S}"
32
33 sed -i "s#^CFLAGS.*#CFLAGS+=${CFLAGS} -I.#" Makefile
34
35 if use static ; then
36 sed -i "s#-ltre#-L${S}/${TREVERS}/lib/.libs/ -ltre#g" Makefile
37 else
38 sed -i "s#-static##g" Makefile
39 fi
40 sed -i "s#ln -f -s crm114_tre crm114##" Makefile
41
42 if use mimencode ; then
43 einfo "Using mimencode -- adjusting mailfilter.cf"
44 sed -i 's%#:mime_decoder: /mimencode -u/%:mime_decoder: /mimencode -u/%' \
45 mailfilter.cf
46 sed -i 's%:mime_decoder: /mewdecode/%#:mime_decoder: /mewdecode/%' \
47 mailfilter.cf
48 elif use normalizemime ; then
49 einfo "Using normalizemime -- adjusting mailfilter.cf"
50 sed -i 's%#:mime_decoder: /normalizemime/%:mime_decoder: /normalizemime/%' mailfilter.cf
51
52 sed -i 's%:mime_decoder: /mewdecode/%#:mime_decoder: /mewdecode/%' \
53 mailfilter.cf
54 fi
55
56 cd "${S}"/tre-${TREVERS}
57 chmod +x configure
58 }
59
60 src_compile() {
61 # Build TRE library.
62 if use static ; then
63 cd "${S}"/tre-${TREVERS}
64 econf \
65 $(use_enable nls) \
66 $(use_enable static) \
67 --enable-system-abi \
68 --disable-profile \
69 --disable-agrep \
70 --disable-debug || die
71 emake || die
72 fi
73
74 # Build crm114
75 cd "${S}"
76 emake || die
77 }
78
79 src_install() {
80 dobin crm114_tre cssutil cssdiff cssmerge
81 dobin osbf-util
82 dosym crm114_tre /usr/bin/crm114
83 dosym crm114_tre /usr/bin/crm
84
85 dodoc COLOPHON.txt CRM114_Mailfilter_HOWTO.txt FAQ.txt INTRO.txt
86 dodoc QUICKREF.txt classify_details.txt inoc_passwd.txt
87 dodoc knownbugs.txt things_to_do.txt README
88 docinto examples
89 dodoc *.example
90 dodoc procmail.recipe
91
92 insinto /usr/share/${PN}
93 doins *.crm
94 doins *.cf
95 doins *.mfp
96 }
97
98 pkg_postinst() {
99 echo
100 elog "The spam-filter CRM files are installed in /usr/share/${PN}."
101 echo
102 }

  ViewVC Help
Powered by ViewVC 1.1.20