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

Contents of /app-text/crm114/crm114-20050415.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, 5 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-20050415.ebuild,v 1.2 2007/03/04 07:32:53 genone Exp $
4
5 inherit eutils
6
7 IUSE="nls static normalizemime mew mimencode"
8
9 MY_P="${P}.BlameTheIRS.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
28 src_unpack() {
29 unpack ${A}
30 cd ${S}
31
32 sed -i "s#^CFLAGS.*#CFLAGS+=${CFLAGS}#" Makefile
33
34 if use static ; then
35 sed -i "s#-ltre#-L${S}/tre-${TREVERS}/lib/.libs/ -ltre#g" Makefile
36 else
37 sed -i "s#-static##g" Makefile
38 fi
39 sed -i "s#ln -f -s crm114_tre crm114##" Makefile
40
41 if use mimencode ; then
42 einfo "Using mimencode -- adjusting mailfilter.cf"
43 sed -i 's%#:mime_decoder: /mimencode -u/%:mime_decoder: /mimencode -u/%' \
44 mailfilter.cf
45 sed -i 's%:mime_decoder: /mewdecode/%#:mime_decoder: /mewdecode/%' \
46 mailfilter.cf
47 elif use normalizemime ; then
48 einfo "Using normalizemime -- adjusting mailfilter.cf"
49 sed -i 's%#:mime_decoder: /normalizemime/%:mime_decoder: /normalizemime/%' mailfilter.cf
50
51 sed -i 's%:mime_decoder: /mewdecode/%#:mime_decoder: /mewdecode/%' \
52 mailfilter.cf
53 fi
54
55 cd ${S}/tre-${TREVERS}
56 chmod +x configure
57 }
58
59 src_compile() {
60 # Build TRE library.
61 if use static ; then
62 cd ${S}/tre-${TREVERS}
63 econf \
64 $(use_enable nls) \
65 $(use_enable static) \
66 --enable-system-abi \
67 --disable-profile \
68 --disable-agrep \
69 --disable-debug || die
70 emake || die
71 fi
72
73 # Build crm114
74 emake -j1 || die
75 }
76
77 src_install() {
78 dobin crm114_tre cssutil cssdiff cssmerge
79 dobin osbf-util
80 dosym crm114_tre /usr/bin/crm114
81 dosym crm114_tre /usr/bin/crm
82
83 dodoc COLOPHON.txt CRM114_Mailfilter_HOWTO.txt FAQ.txt INTRO.txt
84 dodoc QUICKREF.txt classify_details.txt inoc_passwd.txt
85 dodoc knownbugs.txt things_to_do.txt README
86 docinto examples
87 dodoc *.example
88
89 insinto /usr/share/${PN}
90 doins *.crm
91 doins *.cf
92 doins *.mfp
93 }
94
95 pkg_postinst() {
96 echo
97 elog "The spam-filter CRM files are installed in /usr/share/${PN}."
98 echo
99 }

  ViewVC Help
Powered by ViewVC 1.1.20