/[gentoo-x86]/dev-python/pyzor/pyzor-0.4.0-r4.ebuild
Gentoo

Contents of /dev-python/pyzor/pyzor-0.4.0-r4.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (show annotations) (download)
Fri Sep 4 17:52:44 2009 UTC (10 years, 11 months ago) by patrick
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Remove old
(Portage version: 2.2_rc40/cvs/Linux x86_64)

1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/pyzor/pyzor-0.4.0-r4.ebuild,v 1.2 2009/01/06 06:02:29 mr_bones_ Exp $
4
5 inherit distutils eutils
6
7 DESCRIPTION="A distributed, collaborative spam detection and filtering network"
8 HOMEPAGE="http://pyzor.sourceforge.net/"
9
10 MY_PV="${PV}+cvs20030201"
11 MY_P="${PN}_${MY_PV}"
12 DEBIAN_PATCH_VERSION="8"
13 DEBIAN_PATCH="${MY_P}-${DEBIAN_PATCH_VERSION}.diff.gz"
14 # Original:
15 #SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
16 # Debian CVS snapshot
17 SRC_URI="
18 mirror://debian/pool/main/p/${PN}/${MY_P}.orig.tar.gz
19 mirror://debian/pool/main/p/${PN}/${DEBIAN_PATCH}"
20
21 LICENSE="GPL-2"
22 SLOT="0"
23 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
24 IUSE="pyzord"
25
26 DEPEND="dev-lang/python"
27
28 S="${WORKDIR}/${MY_P//_/-}"
29
30 pkg_setup() {
31 if use pyzord ; then
32 if ! built_with_use 'dev-lang/python' gdbm ; then
33 die "you need to rebuild python with gdbm support"
34 fi
35 fi
36 }
37
38 src_unpack() {
39 unpack ${MY_P}.orig.tar.gz
40 epatch "${DISTDIR}"/${DEBIAN_PATCH}
41 cd "${S}"
42 epatch "${S}"/debian/patches/*dpatch
43
44 # Same as Debian 08_define_mbox.dpatch
45 #epatch "${FILESDIR}/debian_mbox.patch"
46 # Same as Debian 07_handle_unknown_encodings.dpatch
47 #epatch "${FILESDIR}/handle_unknown_encodings.patch"
48
49 # Gentoo-unique
50 epatch "${FILESDIR}/pyzord_getopt.patch"
51 epatch "${FILESDIR}/unknown_type.patch"
52
53 # rfc822BodyCleanerTest doesn't work fine
54 # remove it until it's fixed
55 sed -i \
56 -e '/rfc822BodyCleanerTest/,/self\.assertEqual/d' \
57 unittests.py || die "sed in unittest.py failed"
58 }
59
60 src_install () {
61 DOCS="INSTALL THANKS UPGRADING"
62 distutils_src_install
63 dohtml docs/usage.html
64 rm -rf "${D}/usr/share/doc/pyzor"
65
66 if use pyzord ; then
67 dodir /usr/sbin
68 mv "${D}/usr/bin/pyzord" "${D}/usr/sbin/"
69 fi
70 }
71
72 pkg_postinst() {
73 if use pyzord ; then
74 ewarn "/usr/bin/pyzord has been moved to /usr/sbin"
75 fi
76 }
77
78 src_test() {
79 PYTHONPATH=build/lib/ "${python}" unittests.py || die "tests failed"
80 }

  ViewVC Help
Powered by ViewVC 1.1.20