summaryrefslogtreecommitdiff
blob: bd99d4a89c724961b45b3c910fc1475c78f0372a (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-arcade/mtp-target-bin/mtp-target-bin-1.2.0.ebuild,v 1.8 2006/12/01 20:47:59 wolf31o2 Exp $

inherit games

MY_PN=${PN/-bin}
DESCRIPTION="a Monkey Target clone (six mini-game from Super Monkey Ball)"
HOMEPAGE="http://www.mtp-target.org/"
SRC_URI="http://mtptarget.free.fr/download/${MY_PN}-${PV}.tar.bz2"

LICENSE="GPL-2"
SLOT="0"
KEYWORDS="amd64 x86"
IUSE=""
RESTRICT="strip"

DEPEND=""
RDEPEND="dev-libs/STLport
	sys-libs/zlib
	dev-libs/libxml2
	x11-libs/libXmu
	virtual/opengl
	=media-libs/freetype-2*
	media-libs/jpeg
	=dev-lang/lua-5*"

S=${WORKDIR}/${MY_PN}

src_unpack() {
	unpack ${A}
	cd "${S}"
	find . -type d -name CVS -print0 | xargs -0 rm -r
}

src_install() {
	rm -f {client,server}/launch.sh

	dodir "${GAMES_PREFIX_OPT}/${PN}"
	cp -pPR "${S}/"* "${D}/${GAMES_PREFIX_OPT}"/${PN}/

	games_make_wrapper ${PN}-client ./client "${GAMES_PREFIX_OPT}/${PN}/client" ../lib
	games_make_wrapper ${PN}-server ./mtp_target_service "${GAMES_PREFIX_OPT}/${PN}/server" ../lib

	dosym /usr/lib/liblualib.so "${GAMES_PREFIX_OPT}"/${PN}/lib/liblualib50.so.5.0
	dosym /usr/lib/liblua.so "${GAMES_PREFIX_OPT}"/${PN}/lib/liblua50.so.5.0
	dosym /usr/lib/libcurl.so "${GAMES_PREFIX_OPT}"/${PN}/lib/libcurl.so.2

	prepgamesdirs
	cd "${D}/${GAMES_PREFIX_OPT}"/${PN}
	cp client/mtp_target{_default,}.cfg || die "client cfg"
	cp server/mtp_target_service{_default,}.cfg || die "server cfg"
	chown ${GAMES_USER}:${GAMES_GROUP} client/mtp_target.cfg server/mtp_target_service.cfg
	chmod 660 client/mtp_target.cfg server/mtp_target_service.cfg
}