1 # Copyright 1999-2016 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
8 DIALOG_URL_BASE=http://files.bioware.com/neverwinternights/dialog/
10 DESCRIPTION="Neverwinter Nights Dedicated server"
11 HOMEPAGE="http://nwn.bioware.com/downloads/standaloneserver.html"
12 SRC_URI="http://files.bioware.com/neverwinternights/updates/windows/server/NWNDedicatedServer${PV}.zip
13 linguas_en? ( ${DIALOG_URL_BASE}/english/NWNEnglish${PV}dialog.zip )"
17 KEYWORDS="-* ~amd64 ~x86"
19 RESTRICT="mirror strip"
21 DEPEND="app-arch/unzip"
26 QA_PREBUILT="${dir:1}/common/nwserver"
31 unpack NWNDedicatedServer${PV}.zip
32 tar -zxf linuxdedserver${PV/./}.tar.gz || die
33 rm -f *dedserver*.{tar.gz,sit,zip} *.exe *.dll || die
35 local currentlocale=""
39 if [ -z "${a/*dialog*/}" ] ; then
40 if [ -z "${a/*English*/}" ]; then currentlocale="en"; fi
41 if [ -z "${a/*French*/}" ]; then currentlocale="fr"; fi
42 if [ -z "${a/*German*/}" ]; then currentlocale="de"; fi
43 if [ -z "${a/*Italian*/}" ]; then currentlocale="it"; fi
44 if [ -z "${a/*Spanish*/}" ]; then currentlocale="es"; fi
45 if [ -z "${a/*Japanese*/}" ]; then currentlocale="ja"; fi
46 mkdir ${currentlocale} || die
47 cd ${currentlocale} || die
48 cp -rfl ../common/* . || die
59 for currentlocale in * ; do
60 if [[ ${currentlocale} != "common" ]]
62 make_wrapper nwserver-${currentlocale} ./nwserver "${dir}/${currentlocale}" "${dir}/${currentlocale}"
66 mv * "${D}/${dir}"/ || die
68 chmod -R g+w "${D}/${dir}"