summaryrefslogtreecommitdiff
blob: 34dba560903091707440da968c265b0509b7530f (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
64
65
66
67
68
69
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-fps/etqw-data/etqw-data-1.0.ebuild,v 1.2 2009/04/14 07:27:03 mr_bones_ Exp $

inherit eutils games

DESCRIPTION="Enemy Territory: Quake Wars data files"
HOMEPAGE="http://zerowing.idsoftware.com/linux/etqw/"
SRC_URI=""

LICENSE="ETQW"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
IUSE="videos"
PROPERTIES="interactive"

S=${WORKDIR}

GAMES_CHECK_LICENSE="yes"

src_unpack() {
	cdrom_get_cds Setup/Data/base/DEU:Setup/Data/base/POL:Setup/Data/base
}

src_install() {
	local dir=${GAMES_PREFIX_OPT}/etqw

	cd "${CDROM_ROOT}"/Setup/Data/base
	insinto "${dir}"/base
	doins pak00{0..4}.pk4 || die "doins pak failed"
	doins -r megatextures || die "doins megatextures failed"

	case ${CDROM_SET} in
		0)
			doins \
				zpak_english000.pk4 \
				DEU/zpak_german000.pk4 \
				ESP/zpak_spanish000.pk4 \
				FRA/zpak_french000.pk4 \
				|| die "doins zpak failed"
			;;
		1)
			doins \
				POL/zpak_polish000.pk4 \
				RUS/zpak_russian000.pk4 \
				|| die "doins zpak failed"
			;;
		2)
			doins zpak_english000.pk4 || die "doins zpak failed"
			;;
	esac

	if use videos ; then
		case ${CDROM_SET} in
			0|2)
				doins -r video || die "doins video failed"
				;;
		esac
	fi

	prepgamesdirs
}

pkg_postinst() {
	games_pkg_postinst

	elog "This is just the data portion of the game. You will need to install"
	elog "games-fps/etqw-bin to play it."
}