]> Pileus Git - ~andy/sunrise/blob - net-nntp/xpn/xpn-1.2.6.ebuild
app-admin/jailkit: Add ~amd64 keyword, EAPI bump
[~andy/sunrise] / net-nntp / xpn / xpn-1.2.6.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=3
6
7 PYTHON_DEPEND="2"
8
9 inherit eutils multilib python
10
11 DESCRIPTION="A graphical newsreader written in Python"
12 HOMEPAGE="http://xpn.altervista.org/index-en.html"
13 SRC_URI="
14         mirror://debian/pool/main/x/${PN}/${PN}_${PV}-5.debian.tar.gz
15         http://xpn.altervista.org/codice/${P}.tar.gz"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS="~amd64 ~x86"
20 IUSE=""
21
22 LANGS="de fr it"
23 for i in ${LANGS} ; do
24         IUSE="${IUSE} linguas_${i}"
25 done
26
27 DEPEND=""
28 RDEPEND="
29         dev-python/pygtk
30         x11-libs/gtk+:2"
31
32 pkg_setup() {
33         python_set_active_version 2
34         python_convert_shebangs -r 2 .
35 }
36
37 src_prepare() {
38         # Debian Patches
39         epatch "${WORKDIR}"/debian/patches/0{1..4}*.patch
40 }
41
42 src_install() {
43         for i in ${LANGS} ; do
44                 insinto /usr/share/locale
45                 use linguas_${i} && doins -r lang/${i}
46         done
47
48         insinto $(python_get_sitedir)/${PN}/
49         doins -r pixmaps xpn_src ${PN}.py
50
51         newicon pixmaps/xpn-icon.png ${PN}.png
52         make_desktop_entry "${PN} -d" ${PN} /usr/share/pixmaps/${PN}.png "Network;News"
53
54         dodoc AUTHORS ChangeLog README
55         dohtml xpn.html
56
57         make_wrapper ${PN} "python2 ${PN}.py" $(python_get_sitedir)/${PN}
58
59         python_need_rebuild
60 }
61
62 pkg_postinst() {
63         python_mod_optimize ${PN}
64 }
65
66 pkg_postrm() {
67         python_mod_cleanup ${PN}
68 }