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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Wed Jan 23 03:26:03 2008 UTC (10 years, 7 months ago) by steev
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
A bunch of cleanups... fixed quoting issues, removed old builds,
unfortunately, amd64 doesn't have a recent copy stable, need to file a
bug about that.  Add the latest release as well. Hopefully we can get
this stable in ~30 days.  This should fix bug #170127, as well as bug
(Portage version: 2.1.4)

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

  ViewVC Help
Powered by ViewVC 1.1.20