]> Pileus Git - ~andy/sunrise/blob - games-util/pyfa/pyfa-1.0.3.ebuild
x11-drivers/nostromo_n50: Reduce nostromo_n50-1.4.1-asneeded.patch to essentials
[~andy/sunrise] / games-util / pyfa / pyfa-1.0.3.ebuild
1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI=3
6 PYTHON_DEPEND="2:2.6"
7 PYTHON_USE_WITH="sqlite threads"
8
9 inherit eutils python
10
11 if [[ ${PV/_rc*/} == ${PV} ]] ; then
12         MY_PV=${PV}-incarna-src
13         FOLDER=stable/${PV}
14 else
15         MY_PV=${PV/_rc/-stable-RC}-src
16         FOLDER=stable/${PV/*_rc/RC}
17 fi
18
19 DESCRIPTION="Python Fitting Assistant - a ship fitting application for EVE Online"
20 HOMEPAGE="http://www.evefit.org/Pyfa"
21 SRC_URI="http://dl.evefit.org/${FOLDER}/${PN}-${MY_PV}.tar.bz2"
22
23 LICENSE="GPL-3 LGPL-2.1 CCPL-Attribution-2.5 free-noncomm"
24 SLOT="0"
25 KEYWORDS="~amd64 ~x86"
26 IUSE="+graph"
27
28 RDEPEND="dev-python/sqlalchemy
29         >=dev-python/wxpython-2.8
30         graph? ( dev-python/matplotlib[wxwidgets] dev-python/numpy )"
31 DEPEND=${RDEPEND}
32
33 S=${WORKDIR}/${PN}
34
35 src_prepare() {
36         # make staticPath settable from configforced again
37         epatch "${FILESDIR}/${P}-staticPath.patch"
38
39         python_convert_shebangs -r -x 2 .
40         sed -e "s:%%SITEDIR%%:$(python_get_sitedir):" -e "s:%%EROOT%%:${EROOT}:" \
41                 "${FILESDIR}/configforced.py" > configforced.py
42 }
43
44 src_install() {
45         local packagedir=$(python_get_sitedir)/${PN}
46         insinto "${packagedir}"
47         doins -r eos gui icons service config*.py info.py gpl.txt || die "doins failed"
48         exeinto "${packagedir}"
49         doexe ${PN}.py || die "doexe failed"
50         dosym "${packagedir}/${PN}.py" /usr/bin/${PN} || die "dosym failed"
51         insinto /usr/share/${PN}
52         doins -r staticdata || die "doins failed"
53         dodoc readme.txt || die "dodoc failed"
54         doicon icons/${PN}.png || die "doicon failed"
55         domenu "${FILESDIR}/${PN}.desktop" || die "domenu failed"
56 }
57
58 pkg_postinst() {
59         python_mod_optimize ${PN}
60 }
61
62 pkg_postrm() {
63         python_mod_cleanup ${PN}
64 }