summaryrefslogtreecommitdiff
blob: 894365f46972b7a76c7b2e15dbe5ff46294e8583 (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-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

inherit python eutils multilib

DESCRIPTION="A graphical newsreader written in Python"
HOMEPAGE="http://xpn.altervista.org/index-en.html"
SRC_URI="http://xpn.altervista.org/codice/${P}.tar.gz"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~x86"
LANGS="de fr it"
for i in ${LANGS} ; do
	IUSE="${IUSE} linguas_${i}"
done

DEPEND=""
RDEPEND=">=dev-lang/python-2.4
	>=dev-python/pygtk-2.8
	>=x11-libs/gtk+-2.8"

src_install() {
	python_version
	exeinto /usr/$(get_libdir)/python${PYVER}/site-packages/${PN}
	doexe ${PN}.py

	for i in ${LANGS} ; do
		insinto /usr/$(get_libdir)/python${PYVER}/site-packages/${PN}/lang
		use linguas_${i} && doins -r lang/${i}
	done

	insinto /usr/$(get_libdir)/python${PYVER}/site-packages/${PN}/pixmaps
	doins pixmaps/*

	insinto /usr/$(get_libdir)/python${PYVER}/site-packages/${PN}/xpn_src
	doins xpn_src/*

	newicon pixmaps/xpn-icon.png ${PN}.png
	make_desktop_entry "${PN} -d" ${PN} ${PN}.png "Network;News"

	dodoc AUTHORS ChangeLog README
	dohtml xpn.html

	make_wrapper ${PN} ./${PN}.py /usr/$(get_libdir)/python${PYVER}/site-packages/${PN}
}

pkg_postinst() {
	python_version
	python_mod_optimize "${ROOT}usr/$(get_libdir)/python${PYVER}/site-packages/${PN}"
}

pkg_postrm() {
	python_mod_cleanup
}