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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (show annotations) (download)
Tue Mar 6 14:29:46 2012 UTC (2 years, 5 months ago) by ranger
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +2 -2 lines
Marking crm114-20100106 ppc for bug 401275

(Portage version: 2.1.10.11/cvs/Linux ppc64)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-text/crm114/crm114-20100106.ebuild,v 1.5 2012/02/16 18:39:19 phajdan.jr Exp $
4
5 EAPI=2
6
7 MY_P="${P}-BlameMichelson.src"
8
9 inherit eutils toolchain-funcs
10
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/tarballs/${MY_P}.tar.gz"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="amd64 ppc x86 ~x86-fbsd"
18 IUSE="mew mimencode nls normalizemime static test"
19
20 RDEPEND="
21 static? ( dev-libs/tre[static-libs] )
22 !static? ( dev-libs/tre )
23 mew? ( app-emacs/mew )
24 mimencode? ( net-mail/metamail )
25 normalizemime? ( mail-filter/normalizemime )"
26 DEPEND="${RDEPEND}
27 test? ( sys-apps/miscfiles )"
28
29 S="${WORKDIR}"/${MY_P}
30
31 src_prepare() {
32 sed \
33 -e "s#-O3 -Wall##" \
34 -e "s#^CC=.*#CC=$(tc-getCC)#" \
35 -i Makefile || die
36 # Upstream recommends static linking
37 if ! use static ; then
38 sed -i "s#LDFLAGS += -static -static-libgcc#LDFLAGS += ${LDFLAGS}#" Makefile || die
39 else
40 sed \
41 -e "s#LDFLAGS += -static -static-libgcc#LDFLAGS += ${LDFLAGS} -static -static-libgcc#" \
42 -i Makefile || die
43 fi
44
45 if use mimencode ; then
46 sed \
47 -e 's%#:mime_decoder: /mimencode -u/%:mime_decoder: /mimencode -u/%' \
48 -e 's%:mime_decoder: /mewdecode/%#:mime_decoder: /mewdecode/%' \
49 -i mailfilter.cf || die
50 elif use normalizemime ; then
51 sed \
52 -e 's%#:mime_decoder: /normalizemime/%:mime_decoder: /normalizemime/%' \
53 -e 's%:mime_decoder: /mewdecode/%#:mime_decoder: /mewdecode/%' \
54 -i mailfilter.cf || die
55 fi
56
57 }
58
59 src_install() {
60 dobin crm114 cssutil cssdiff cssmerge || die
61 dobin cssutil cssdiff cssmerge || die
62 dobin osbf-util || die
63
64 dodoc COLOPHON.txt CRM114_Mailfilter_HOWTO.txt FAQ.txt INTRO.txt || die
65 dodoc QUICKREF.txt CLASSIFY_DETAILS.txt inoc_passwd.txt || die
66 dodoc KNOWNBUGS.txt THINGS_TO_DO.txt README || die
67 docinto examples
68 dodoc *.example || die
69
70 insinto /usr/share/${PN}
71 doins *.crm || die
72 doins *.cf || die
73 doins *.mfp || die
74 }
75
76 src_test() {
77 emake megatest || die
78 }
79
80 pkg_postinst() {
81 elog "The spam-filter CRM files are installed in /usr/share/${PN}."
82 }

  ViewVC Help
Powered by ViewVC 1.1.20