summaryrefslogtreecommitdiff
blob: 4c7d4b5eeb5bef09f74b63a16a5d535fdcd22197 (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-2004 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.5 2004/11/22 21:39:13 josejx 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=""

RDEPEND="virtual/x11
	media-libs/libsdl
	media-libs/sdl-mixer
	media-libs/sdl-image"
DEPEND="${RDEPEND}
	>=sys-apps/sed-4"

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
}