summaryrefslogtreecommitdiff
blob: f1bf39c314f2841251f99bedde8f758d695c4dc3 (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
59
60
61
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="2"

inherit d-games

DESCRIPTION="Matthias Thurau's great OpenGL 3D platform-game Atomorun2008"
HOMEPAGE="http://atomorun2008.whosme.de/"
SRC_URI="http://atomorun2008.whosme.de/${PN}-${PV}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~ppc ~x86"
IUSE=""

RDEPEND="media-libs/libsdl
	media-libs/mesa
	media-libs/sdl-mixer"
DEPEND="${RDEPEND}"

S=${WORKDIR}/${MY_PN}

src_unpack(){
	unpack ${A}
}

src_prepare(){
	cd "${S}/${PN}-${PV}"
	epatch ${FILESDIR}/"${P}.diff"
	sed -i -e "s:resources/:"${GAMES_DATADIR}"/"${PN}"/resources/:" -i src/sound.d

}

src_compile() {
	cd "${S}/${PN}-${PV}"
	emake || die
}

src_install() {
	cd "${S}/${PN}-${PV}"
	dogamesbin ${PN}

	local datadir="${GAMES_DATADIR}"/"${PN}"
	dodir ${datadir}
	insinto "${GAMES_DATADIR}"/"${PN}"
	doins -r resources || die

	insinto "${GAMES_SYSCONFDIR}"/"${PN}"
	doins resources/config.cfg || die "doins config.cfg failed"

	newicon "${FILESDIR}"/"${PN}.png" "${PN}.png"
	make_desktop_entry "${PN}" "${PN}"
	dodoc README*
	prepgamesdirs
}

pkg_postinst() {
	games_pkg_postinst
}