summaryrefslogtreecommitdiff
blob: e76789c1332be35667e166699c96684ea4001e7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-python/cherrypy/cherrypy-2.1.0_beta1.ebuild,v 1.3 2005/07/28 09:45:08 blubb Exp $

inherit distutils

MY_P=${P/c/C}
MY_P=${MY_P/p/P}
MY_P=${MY_P/_beta1/-beta}

DESCRIPTION="CherryPy is a pythonic, object-oriented web development framework."
SRC_URI="mirror://sourceforge/cherrypy/${MY_P}.tar.gz"
HOMEPAGE="http://www.cherrypy.org/"
DEPEND=">=dev-lang/python-2.3"
IUSE=""
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
LICENSE="BSD"
S=${WORKDIR}/${MY_P}

DOCS="CHANGELOG.txt CHERRYPYTEAM.txt"

src_unpack() {
	unpack ${A} || die
	cd ${S}
	epatch ${FILESDIR}/${P}-setup-gentoo.diff
	epatch ${FILESDIR}/${P}-test-gentoo.diff
}

src_install() {
	distutils_src_install
	insinto /usr/share/doc/${P}
	doins -r cherrypy/tutorial
	insinto /usr/share/${PN}
	doins -r cherrypy/test
	dosym /usr/share/doc/${P}/tutorial /usr/share/${PN}
}

src_test() {
	cd cherrypy/test
	python test.py || die "Test failed."
}

pkg_postinst() {
	einfo ""
	einfo "Tutorial files: /usr/share/doc/${P}/tutorial"
	einfo "Test files    : /usr/share/${PN}/test"
	einfo ""
}