summaryrefslogtreecommitdiff
blob: 2e2af45a9b4a3c09be0315998d4ad98fa6014cbb (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
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-puzzle/drod-bin/drod-bin-1.6.5.ebuild,v 1.4 2004/05/12 09:02:45 mr_bones_ Exp $

inherit games eutils

DESCRIPTION="Deadly Rooms Of Death: face room upon room of deadly things, armed with only your sword and your wits"
HOMEPAGE="http://www.drod.net/"
SRC_URI="mirror://sourceforge/drod/CDROD-${PV}-setup.sh.bin"

LICENSE="MPL-1.1"
SLOT="0"
KEYWORDS="-* x86"
IUSE=""

RDEPEND="virtual/x11
	dev-libs/expat
	media-libs/fmod
	media-libs/libsdl
	>=media-libs/sdl-ttf-2.0.6"

S="${WORKDIR}"

src_unpack() {
	unpack_makeself ${A}
	cd ${S}
	epatch ${FILESDIR}/install.patch
}

src_install() {
	./install.sh -R "${D}" -g -rl -pg -I || die "install.sh failed"
	dodir ${GAMES_BINDIR}
	dosym /opt/drod/bin/drod ${GAMES_BINDIR}/drod
	prepgamesdirs
	fperms 770 /opt/drod/bin/Data
}

pkg_preinst() {
	if [ -d ${ROOT}/opt/drod/bin/Data ] ; then
		mv ${ROOT}/opt/drod/bin/Data{,.backup} || die "failed to backup data"
	fi
}

pkg_postinst() {
	if [ -d ${ROOT}/opt/drod/bin/Data.backup ] ; then
		ewarn "Your saved games have been backed up to"
		ewarn "/opt/drod/bin/Data.backup"
	fi
}