summaryrefslogtreecommitdiff
blob: cb5dd9cd8c0d5ab08f4144f9fa1c326d105c4921 (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
62
63
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-arcade/bub-n-bros/bub-n-bros-1.1.ebuild,v 1.6 2004/06/25 03:22:49 agriffis Exp $

inherit games

DESCRIPTION="A multiplayer clone of the famous Bubble Bobble game"
HOMEPAGE="http://bub-n-bros.sourceforge.net/"
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="x86 ppc alpha"
IUSE=""

DEPEND=">=dev-lang/python-2.2*"
RDEPEND=">=dev-python/pygame-1.5.5"

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

src_compile() {
	# Compile the "statesaver" extension module to enable the Clock bonus
	cd ${S}/bubbob
	python setup.py build_ext -i || die

	# Compile the extension module required for the X Window client
	cd ${S}/display
	python setup.py build_ext -i || die
}

src_install() {
	local dir=${GAMES_LIBDIR}/${PN}

	exeinto ${dir}
	doexe *.py

	insinto ${dir}
	cp -r bubbob common display java ${D}/${dir}/

	dodir ${GAMES_BINDIR}
	dosym ${dir}/pclient-pygame.py ${GAMES_BINDIR}/bubnbros
	dosym ${dir}/pclient-xshm.py ${GAMES_BINDIR}/bubnbros-x
	dosym ${dir}/pclient-slow-X.py ${GAMES_BINDIR}/bubnbros-slowx

	dogamesbin ${FILESDIR}/bubnbros-server
	dosed "s:GENTOO_DIR:${dir}/bubbob/:" ${GAMES_BINDIR}/bubnbros-server

	dodoc INSTALL.txt
	dohtml *.html

	find ${D}/${dir} -name CVS -type d -exec rm -rf '{}' \; 2> /dev/null

	prepgamesdirs
}

pkg_postinst() {
	games_pkg_postinst
	echo
	einfo "First you must start a server by running \`bubnbros-server\`."
	einfo "Afterwards you can start the client by running \`bubnbros\`"
	einfo "or \`bubnbros-x\`.  Note that the X version of the game"
	einfo "doesn't support sound and music."
}