summaryrefslogtreecommitdiff
blob: 25c82c0ffdc244c43673b47d892b99e0084f4895 (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
50
51
52
53
54
55
56
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/x11-misc/treeline/treeline-1.0.1-r1.ebuild,v 1.2 2007/05/20 07:39:32 opfer Exp $

inherit python

DESCRIPTION="TreeLine is a structured information storage program."
HOMEPAGE="http://www.bellz.org/treeline"
SRC_URI="http://www.bellz.org/${PN}/${P}.tar.gz
	http://www.bellz.org/${PN}/${PN}-i18n-${PV}a.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="spell"

DEPEND="spell? ( || ( app-text/aspell app-text/ispell ) )
	|| ( dev-python/pyxml dev-libs/expat )
	virtual/python dev-python/PyQt
	=x11-libs/qt-3*"

S="${WORKDIR}"/TreeLine

# Before you go editing below read bugs 177652 and 177645
# or you'll end up breaking it.

src_compile() {
	printf '#!/bin/sh\n\nexec python %s/treeline.py $*\n' \
		/usr/share/treeline > ${S}/treeline
	sed -i -e "s#\(helpFilePath = \)None#\1'/usr/share/treeline'#g" \
		-e "s#\(iconPath = \)None#\1'/usr/share/treeline/icons'#g" \
			${S}/source/treeline.py || die
	sed -i -e 's,translations,/usr/share/treeline/translations,' \
		${S}/source/treeline.py || die
}

src_install() {
	insinto /usr/share/${PN}
	doins source/*.py doc/*.html doc/*.png doc/*.trl

	insinto /usr/share/${PN}/icons
	doins icons/*.png

	insinto /usr/share/${PN}/translations
	doins translations/*.qm

	dobin ${PN}
}

pkg_postinst() {
	python_mod_optimize /usr/share/${PN}
}

pkg_postrm() {
	python_mod_cleanup /usr/share/${PN}
}