summaryrefslogtreecommitdiff
blob: afc2fc0d78aaf5be144b60c8c15b1f5459e9787c (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
57
58
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-strategy/lightyears/lightyears-1.2a.ebuild,v 1.1 2007/04/27 20:57:33 tupone Exp $

inherit eutils games

MY_PN=LightYears
MY_P=${MY_PN}-${PV}

DESCRIPTION="a single-player game with a science-fiction theme"
HOMEPAGE="http://www.jwhitham.org.uk/biscuit_games/LightYears"
SRC_URI="http://www.jwhitham.org.uk/biscuit_games/${MY_PN}/${MY_P}.zip"

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

RDEPEND=">=dev-lang/python-2.4
	>=dev-python/pygame-1.7"
DEPEND="${RDEPEND}
	app-arch/unzip"

S="${WORKDIR}/${MY_PN}"

src_unpack() {
	unpack ${A}
	cd "${S}"

	epatch "${FILESDIR}/${P}"-gentoo.patch
	sed -i -e "s:@GENTOO_LIBDIR@:$(games_get_libdir)/${PN}:" \
		${MY_PN}.py || die "Changing library path failed"
	sed -i -e "s:@GENTOO_DATADIR@:${GAMES_DATADIR}/${PN}:" \
		code/resource.py || die "Changing data path failed"

	mkdirhier html/data
	cp data/{006metal,header}.jpg html/data \
		|| die "Failed moving html data"
	mv data/html*.jpg html/data \
		|| die "Failed moving html data"
}

src_install() {
	dogamesbin ${MY_PN}.py  || die "dogamesbin failed"

	insinto "$(games_get_libdir)/${PN}"
	doins code/*.py || die "installing library files failed"

	dodoc README.txt
	dohtml -r *.html html/data

	insinto "${GAMES_DATADIR}/${PN}"
	doins -r data/*

	newicon data/32.png ${PN}.png
	make_desktop_entry ${MY_PN}.py ${MY_PN}
	prepgamesdirs
}