summaryrefslogtreecommitdiff
blob: a5b95fb9099a32466fccd52304c79e17d8a97b7d (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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-fps/rtcwmp-demo/rtcwmp-demo-1.1.ebuild,v 1.4 2006/03/15 22:30:13 wolf31o2 Exp $

inherit eutils games

MY_P="wolfmpdemo-linux-${PV}-MP.x86.run"

DESCRIPTION="Return to Castle Wolfenstein - Multi-player demo"
HOMEPAGE="http://games.activision.com/games/wolfenstein/"
SRC_URI="mirror://idsoftware/wolf/linux/old/${MY_P}
	mirror://3dgamers/returnwolfenstein/${MY_P}"

LICENSE="RTCW"
SLOT="0"
KEYWORDS="-* ~amd64 ~x86"
IUSE="dedicated opengl"
RESTRICT="nostrip nomirror"

RDEPEND="sys-libs/glibc
	dedicated? (
		app-misc/screen )
	!dedicated? (
		virtual/opengl
		|| (
			(
				x11-libs/libX11
				x11-libs/libXext
				x11-libs/libXau
				x11-libs/libXdmcp )
			virtual/x11 ) )
	opengl? (
		virtual/opengl
		|| (
			(
				x11-libs/libX11
				x11-libs/libXext
				x11-libs/libXau
				x11-libs/libXdmcp )
			virtual/x11 ) )
	amd64? (
		app-emulation/emul-linux-x86-xlibs )"

S=${WORKDIR}

GAMES_CHECK_LICENSE="yes"
dir=${GAMES_PREFIX_OPT}/${PN}
Ddir=${D}/${dir}

src_unpack() {
	unpack_makeself ${A} || die "Unpacking files"
}

src_install() {
	insinto "${dir}"
	doins -r demomain Docs

	exeinto "${dir}"
	doexe bin/x86/*.x86 openurl.sh || die "copying exe"

	games_make_wrapper rtcwmp-demo ./wolf.x86 "${dir}" "${dir}"

	if use dedicated; then
		games_make_wrapper rtcwmp-demo-ded ./wolfded.x86 "${dir}" "${dir}"
		exeinto /etc/init.d
		newexe "${FILESDIR}"/rtcwmp-demo-ded.rc rtcwmp-demo-ded
		dosed "s:GENTOO_DIR:${dir}:" /etc/init.d/rtcwmp-demo-ded
	fi

	doins WolfMP.xpm CHANGES QUICKSTART
	newicon WolfMP.xpm rtcwmp-demo.xpm

	prepgamesdirs
	make_desktop_entry rtcwmp-demo "Return to Castle Wolfenstein (MP demo)" \
		rtcwmp-demo.xpm
}

pkg_postinst() {
	games_pkg_postinst
	einfo "Install 'rtcwsp-demo' for single-player"
	echo
	einfo "Run 'rtcwmp-demo' for multi-player"
	if use dedicated; then
		echo
		einfo "Start a dedicated server with"
		einfo "'/etc/init.d/rtcwmp-demo-ded start'"
		echo
		einfo "Start the server at boot with"
		einfo "'rc-update add rtcwmp-demo-ded default'"
	fi
}