summaryrefslogtreecommitdiff
blob: 725a5d2a8f18a12faa052488030584a322933c0b (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
# Copyright 1999-2004 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-roguelike/tome/tome-2.2.3.ebuild,v 1.4 2004/02/20 06:55:42 mr_bones_ Exp $

inherit games

MY_PV=${PV//./}
DESCRIPTION="save the world from Morgoth and battle evil (or become evil ;])"
HOMEPAGE="http://t-o-m-e.net/"
SRC_URI="http://t-o-m-e.net/dl/src/tome-${MY_PV}-src.tgz"

LICENSE="Moria"
SLOT="0"
KEYWORDS="x86 ppc"

RDEPEND="virtual/glibc
	>=sys-libs/ncurses-5
	virtual/x11"

S=${WORKDIR}/tome-${MY_PV}-src

src_compile() {
	cd src
	emake \
		-f makefile.std \
		COPTS="${CFLAGS}" \
		BINDIR=${GAMES_BINDIR} \
		LIBDIR=${GAMES_DATADIR}/${PN} \
		|| die "emake failed"
}

src_install() {
	cd ${S}/src
	emake \
		-f makefile.std \
		OWNER=${GAMES_USER} \
		BINDIR=${D}/${GAMES_BINDIR} \
		LIBDIR=${D}/${GAMES_DATADIR}/${PN} install \
		|| die "make install failed"
	cd ${S}
	dodoc *.txt

	prepgamesdirs
	touch ${D}/${GAMES_DATADIR}/${PN}/apex/scores.raw
	fperms g+w ${GAMES_DATADIR}/${PN}/apex/scores.raw
	fperms g+w ${GAMES_DATADIR}/${PN}/data
}

pkg_postinst() {
	games_pkg_postinst
	echo
	ewarn "ToME ${PV} is not save-game compatible with previous versions."
	echo
	einfo "If you have older save files and you wish to continue those games,"
	einfo "you'll need to remerge the version of ToME with which you started"
	einfo "those save-games."
}