]> Pileus Git - ~andy/sunrise/blob - games-arcade/whichwayisup/whichwayisup-0.7.0.ebuild
app-portage/portpeek: Cosmetic changes. For reference, bug number is 118663
[~andy/sunrise] / games-arcade / whichwayisup / whichwayisup-0.7.0.ebuild
1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 NEED_PYTHON="2.4"
6
7 inherit games python
8
9 MY_PV=${PV//./}
10 MY_P=${PN}_b${MY_PV}
11 DESCRIPTION="A traditional and challenging 2D platformer game with a slight rotational twist"
12 HOMEPAGE="http://hectigo.net/puskutraktori/whichwayisup/"
13 SRC_URI="http://hectigo.net/puskutraktori/whichwayisup/${MY_P}.zip"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 KEYWORDS="~amd64 ~x86"
18 IUSE=""
19
20 DEPEND="app-arch/unzip"
21 RDEPEND=">=dev-python/pygame-1.6"
22
23 S=${WORKDIR}/${MY_P}
24
25 src_unpack() {
26         unpack ${A}
27         cd "${S}"
28         sed -i -e "s:libdir\ =\ .*:libdir\ =\ \"$(games_get_libdir)/${PN}\":" \
29                 run_game.py || die "Changing library path failed"
30         sed -i -e "s:data_dir\ =\ .*:data_dir\ =\ \"${GAMES_DATADIR}/${PN}\":" \
31                 lib/data.py || die "Changing data path failed"
32 }
33
34 src_install() {
35         newgamesbin run_game.py ${PN} || die "newgamesbin failed"
36
37         insinto "$(games_get_libdir)/${PN}"
38         doins lib/*.py || die "doins lib failed"
39
40         dodoc README.txt changelog.txt
41
42         insinto "${GAMES_DATADIR}/${PN}"
43         doins -r data/* || die "doins data failed"
44
45         doicon "${FILESDIR}/${PN}"-{32,48,64}.png
46         make_desktop_entry ${PN} "Which Way Is Up" "${PN}"-64.png
47         prepgamesdirs
48 }
49
50 pkg_postinst() {
51         python_mod_optimize "$(games_get_libdir)/${PN}"
52         games_pkg_postinst
53 }
54
55 pkg_postrm() {
56         python_mod_cleanup "$(games_get_libdir)/${PN}"
57 }