summaryrefslogtreecommitdiff
blob: 604962d43e30f745623e594fb2609ac44dbca49d (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
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-puzzle/twindistress/twindistress-1.03.ebuild,v 1.6 2006/02/17 22:33:37 tupone Exp $

inherit eutils games

MY_P="twind-${PV}"
S="${WORKDIR}/${MY_P}"
DESCRIPTION="Match and remove all of the blocks before time runs out"
HOMEPAGE="http://twind.sourceforge.net/"
SRC_URI="mirror://sourceforge/twind/${MY_P}.tar.gz"

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

DEPEND="media-libs/sdl-mixer
	media-libs/sdl-image"

src_unpack() {
	unpack ${A}
	cd ${S}
	sed -i \
		-e "s:/usr/local/bin/:${GAMES_BINDIR}/:" \
		-e "s:/usr/local/share/games/twind/:${GAMES_DATADIR}/${PN}/:" \
		-e "s:/var/lib/games/twind/:${GAMES_STATEDIR}/${PN}/:" \
			Makefile \
				|| die "sed Makefile failed"
}

src_install() {
	dogamesbin twind || die "dogamesbin failed"
	dodir "${GAMES_DATADIR}/${PN}"
	cp -r graphics/ music/ sound/ "${D}${GAMES_DATADIR}/${PN}" \
		|| die "cp failed"
	insinto /usr/share/pixmaps
	doins graphics/twind.png || die "doins failed"
	make_desktop_entry twind "Twin Distress" twind.png \
		|| die "make_desktop_entry failed"
	dodoc AUTHORS CREDITS ChangeLog NEWS README TODO || die "dodoc failed"
	dodir "${GAMES_STATEDIR}/${PN}" || die "dodir failed"
	touch "${D}${GAMES_STATEDIR}/${PN}/twind.hscr"
	prepgamesdirs
	fperms 660 "${GAMES_STATEDIR}/${PN}/twind.hscr" || die "fperms failed"
}

pkg_postinst() {
	games_pkg_postinst
	echo
	einfo "If sdl_mixer isn't built with ogg vorbis support, then you won't"
	einfo "be able to hear the music"
	echo
}