summaryrefslogtreecommitdiff
blob: 20b603ab9b7c1d5ef5394c11b3e66c6235fbde53 (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
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-server/nwn-ded/nwn-ded-1.65.ebuild,v 1.2 2004/12/30 09:40:38 vapier Exp $

inherit games

DIALOG_URL_BASE=http://nwdownloads.bioware.com/neverwinternights/patch/dialog/

DESCRIPTION="Neverwinter Nights Dedicated server"
HOMEPAGE="http://nwn.bioware.com/downloads/standaloneserver.html"
SRC_URI="http://nwdownloads.bioware.com/neverwinternights/standaloneserver/NWNDedicatedServer1.64.zip
	http://content.bioware.com/neverwinternights/linux/165/linuxserverupdate1xxto165.tar.gz
	linguas_fr? ( ${DIALOG_URL_BASE}/french/NWNFrench${PV}dialog.zip )
	linguas_de? ( ${DIALOG_URL_BASE}/german/NWNGerman${PV}dialog.zip )
	linguas_it? ( ${DIALOG_URL_BASE}/italian/NWNItalian${PV}dialog.zip )
	linguas_es? ( ${DIALOG_URL_BASE}/spanish/NWNSpanish${PV}dialog.zip )
	!linguas_de? ( !linguas_fr? ( !linguas_es? ( !linguas_it? (
		${PATCH_URL_BASE}eng.tar.gz ${DIALOG_URL_BASE}/english/NWNEnglish${PV}dialog.zip
	) ) ) )"

LICENSE="NWN-EULA"
SLOT="0"
KEYWORDS="-* x86"
IUSE=""
RESTRICT="nomirror"

DEPEND="app-arch/unzip"
RDEPEND=""

S="${WORKDIR}"

src_unpack() {
	unpack NWNDedicatedServer1.64.zip
	tar -zxf linuxdedserver164.tar.gz || die "unpack linuxdedserver"
	rm -f *dedserver*.{tar.gz,sit}

	unpack linuxserverupdate1xxto165.tar.gz
	local Aarray=(${A})
	unpack ${Aarray[2]}
}

src_install() {
	local dir=${GAMES_PREFIX_OPT}/${PN}
	dodir ${dir}

	mv "${S}"/* "${D}/${dir}"/ || die "installing server"
	dogamesbin "${FILESDIR}"/nwserver
	dosed "s:GENTOO_DIR:${dir}:" "${GAMES_BINDIR}"/nwserver

	prepgamesdirs
	chmod -R g+w "${D}/${dir}"
}