summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'games-server')
-rw-r--r--games-server/ut2004-ded/files/ut2004-ded.confd11
-rw-r--r--games-server/ut2004-ded/files/ut2004-ded.initd26
-rw-r--r--games-server/ut2004-ded/ut2004-ded-3369.3-r1.ebuild93
-rw-r--r--games-server/ut2004-ded/ut2004-ded-3369.3-r2.ebuild88
4 files changed, 99 insertions, 119 deletions
diff --git a/games-server/ut2004-ded/files/ut2004-ded.confd b/games-server/ut2004-ded/files/ut2004-ded.confd
index a485b12d221e..e82238b93de0 100644
--- a/games-server/ut2004-ded/files/ut2004-ded.confd
+++ b/games-server/ut2004-ded/files/ut2004-ded.confd
@@ -1,9 +1,6 @@
-# User and group the server should run as
-ut2004_ded_user="@USER@"
-ut2004_ded_group="@GROUP@"
+# User and group the server should run as.
+ut2004_ded_user="nobody"
+ut2004_ded_group="nobody"
-# Directory to use for HOME
-ut2004_ded_home="@HOME@"
-
-# Any extra options you want to pass to the server
+# Any extra options you want to pass to the server.
ut2004_ded_opts="DM-Deck17"
diff --git a/games-server/ut2004-ded/files/ut2004-ded.initd b/games-server/ut2004-ded/files/ut2004-ded.initd
index fe323a9e00ee..c4cf9810cd15 100644
--- a/games-server/ut2004-ded/files/ut2004-ded.initd
+++ b/games-server/ut2004-ded/files/ut2004-ded.initd
@@ -1,25 +1,13 @@
#!/sbin/openrc-run
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
+pidfile="/var/run/${RC_SVCNAME}.pid"
+command_background="true"
+command_user="${ut2004_ded_user}:${ut2004_ded_group}"
+command="ut2004-ded"
+command_args="${ut2004_ded_opts}"
+
depend() {
need net
}
-
-start() {
- ebegin "Starting ut2004-ded"
- start-stop-daemon --start --quiet --background --make-pidfile \
- --pidfile /var/run/ut2004-ded.pid \
- --chuid ${ut2004_ded_user}:${ut2004_ded_group} \
- --env HOME="${ut2004_ded_home}" \
- --exec "@DIR@/ut2004-ded" \
- -- ${ut2004_ded_opts}
- eend $?
-}
-
-stop() {
- ebegin "Stopping ut2004-ded"
- start-stop-daemon --stop \
- --pidfile /var/run/ut2004-ded.pid
- eend $?
-}
diff --git a/games-server/ut2004-ded/ut2004-ded-3369.3-r1.ebuild b/games-server/ut2004-ded/ut2004-ded-3369.3-r1.ebuild
deleted file mode 100644
index cfee57c4fc69..000000000000
--- a/games-server/ut2004-ded/ut2004-ded-3369.3-r1.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit games
-
-BONUSPACK_P="dedicatedserver3339-bonuspack.zip"
-PATCH_P="ut2004-lnxpatch${PV%.*}-2.tar.bz2"
-DESCRIPTION="Unreal Tournament 2004 Linux Dedicated Server"
-HOMEPAGE="http://www.unrealtournament.com/"
-SRC_URI="
- https://files.chaoticdreams.org/UT2004/DedicatedServer3339-BonusPack.zip -> ${BONUSPACK_P}
- http://ut2004.ut-files.com/index.php?dir=Patches/Linux/&file=${PATCH_P} -> ${PATCH_P}
- https://dev.gentoo.org/~chewi/distfiles/ut2004-v${PV/./-}-linux-dedicated.7z
-"
-
-LICENSE="ut2003"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE=""
-RESTRICT="bindist mirror strip"
-
-DEPEND="app-arch/unzip
- app-arch/p7zip"
-RDEPEND="sys-libs/glibc
- !games-fps/ut2004[dedicated]
- games-fps/ut2004-bonuspack-ece
- games-fps/ut2004-bonuspack-mega"
-
-S=${WORKDIR}
-
-dir=${GAMES_PREFIX_OPT}/${PN}
-
-src_prepare() {
- cp -rf UT2004-Patch/* . || die
- rm -rf System/{ucc-bin*,ut2004-bin*,*.dll,*.exe} UT2004-Patch
- if use amd64 ; then
- mv -f ut2004-ucc-bin-09192008/ucc-bin-linux-amd64 System/ucc-bin || die
- else
- mv -f ut2004-ucc-bin-09192008/ucc-bin System/ || die
- fi
- rm -rf ut2004-ucc-bin-09192008
- # Owned by ut2004-bonuspack-ece
- rm -f Animations/{MetalGuardAnim,ONSBPAnimations,NecrisAnim,MechaSkaarjAnims}.ukx
- rm -f Help/BonusPackReadme.txt
- rm -f Maps/{ONS-Adara,ONS-IslandHop,ONS-Tricky,ONS-Urban}.ut2
- rm -f Sounds/{CicadaSnds,DistantBooms,ONSBPSounds}.uax
- rm -f StaticMeshes/{HourAdara,BenMesh02,BenTropicalSM01,ONS-BPJW1,PC_UrbanStatic}.usx
- rm -f System/{ONS-IslandHop,ONS-Tricky,ONS-Adara,ONS-Urban,OnslaughtBP}.int
- rm -f System/xaplayersl3.upl
- rm -f Textures/{ONSBPTextures,BonusParticles,HourAdaraTexor,BenTex02,BenTropical01,PC_UrbanTex,AW-2k4XP,ONSBP_DestroyedVehicles,UT2004ECEPlayerSkins,CicadaTex,Construction_S}.utx
- # Owned by ut2004-bonuspack-mega
- rm -f System/{Manifest.ini,Manifest.int,Packages.md5}
-}
-
-src_install() {
- einfo "This will take a while... go get a pizza or something"
-
- games_make_wrapper ${PN} "./ucc-bin server" "${dir}"/System
-
- insinto "${dir}"
- doins -r *
- fperms +x "${dir}"/System/ucc-bin
-
- sed \
- -e "s:@USER@:${GAMES_USER_DED}:" \
- -e "s:@GROUP@:${GAMES_GROUP}:" \
- -e "s:@HOME@:${GAMES_PREFIX}:" \
- "${FILESDIR}"/${PN}.confd > "${T}"/${PN}.confd || die
- newconfd "${T}"/${PN}.confd ${PN}
-
- sed \
- -e "s:@DIR@:${GAMES_BINDIR}:g" \
- "${FILESDIR}"/${PN}.initd > "${T}"/${PN}.initd || die
- newinitd "${T}"/${PN}.initd ${PN}
-
- prepgamesdirs
-}
-
-pkg_postinst() {
- games_pkg_postinst
- ewarn "You should take the time to edit the default server INI."
- ewarn "Consult the INI Reference at http://www.unrealadmin.org/"
- ewarn "for assistance in adjusting the following file:"
- ewarn "${dir}/System/Default.ini"
- ewarn
- ewarn "To have your server authenticate properly to the"
- ewarn "central server, you MUST visit the following site"
- ewarn "and request a key. This is not required if you"
- ewarn "want an unfindable private server. [DoUplink=False]"
- ewarn
- ewarn "http://unreal.epicgames.com/ut2004server/cdkey.php"
-}
diff --git a/games-server/ut2004-ded/ut2004-ded-3369.3-r2.ebuild b/games-server/ut2004-ded/ut2004-ded-3369.3-r2.ebuild
new file mode 100644
index 000000000000..63f7dcb52408
--- /dev/null
+++ b/games-server/ut2004-ded/ut2004-ded-3369.3-r2.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit check-reqs eutils
+
+BONUSPACK_P="dedicatedserver3339-bonuspack.zip"
+PATCH_P="ut2004-lnxpatch${PV%.*}-2.tar.bz2"
+DESCRIPTION="Unreal Tournament 2004 Linux Dedicated Server"
+HOMEPAGE="https://liandri.beyondunreal.com/Unreal_Tournament_2004"
+SRC_URI="
+ https://ut2004.ut-files.com/Entire_Server_Download/${BONUSPACK_P}
+ https://ut2004.ut-files.com/Patches/Linux/${PATCH_P}
+ https://dev.gentoo.org/~chewi/distfiles/ut2004-v${PV/./-}-linux-dedicated.7z
+"
+
+LICENSE="ut2003"
+SLOT="0"
+KEYWORDS="-* ~amd64 ~x86"
+RESTRICT="bindist mirror strip"
+
+BDEPEND="
+ app-arch/p7zip
+ app-arch/unzip
+"
+
+RDEPEND="
+ !games-fps/ut2004
+ !games-fps/ut2004-data
+ games-fps/ut2004-bonuspack-ece
+ games-fps/ut2004-bonuspack-mega
+ sys-libs/glibc
+"
+
+CHECKREQS_DISK_BUILD="2G"
+QA_PREBUILT="*"
+
+S="${WORKDIR}"
+DIR="/opt/${PN%-ded}"
+
+src_prepare() {
+ default
+
+ if use amd64; then
+ mv ut2004-ucc-bin-09192008/ucc-bin{-linux-amd64,} || die
+ fi
+
+ cp -r UT2004-Patch/* ./ || die
+ mv ut2004-ucc-bin-09192008/ucc-bin System/ || die
+ rm -r System/{ut2004-bin*,*.dll,*.exe} UT2004-Patch/ ut2004-ucc-bin-09192008/ || die
+
+ # In ut2004-bonuspack-ece.
+ rm \
+ Animations/{MechaSkaarjAnims,MetalGuardAnim,NecrisAnim,ONSBPAnimations}.ukx \
+ Help/BonusPackReadme.txt \
+ Maps/ONS-{Adara,Aridoom,Ascendancy,IslandHop,Tricky,Urban}.ut2 \
+ Sounds/{CicadaSnds,DistantBooms,ONSBPSounds}.uax \
+ StaticMeshes/{BenMesh02,BenTropicalSM01,HourAdara,ONS-BPJW1,PC_UrbanStatic}.usx \
+ System/{ONS-{Adara,IslandHop,Tricky,Urban},OnslaughtBP}.int \
+ System/xaplayersl3.upl \
+ Textures/{AW-2k4XP,BenTex02,BenTropical01,BonusParticles,CicadaTex,Construction_S,HourAdaraTexor,ONSBP{_DestroyedVehicles,Textures},PC_UrbanTex,UT2004ECEPlayerSkins}.utx \
+ || die
+
+ # In ut2004-bonuspack-mega.
+ rm System/{Manifest.in[it],Packages.md5} || die
+}
+
+src_install() {
+ insinto "${DIR}"
+ doins -r *
+ fperms +x "${DIR}"/System/ucc-bin
+
+ make_wrapper ${PN} "./ucc-bin server" "${DIR}"/System
+ newconfd "${FILESDIR}"/${PN}.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}.initd ${PN}
+}
+
+pkg_postinst() {
+ elog "You should take the time to edit the default server INI. Consult the INI"
+ elog "Reference at https://unrealadmin.org/server_ini_reference/ut2004 for"
+ elog "assistance in adjusting ${DIR}/System/Default.ini."
+ elog
+ elog "To have your server authenticate properly to the central server, you"
+ elog "MUST visit https://www.unrealadmin.org/server_cdkey and request a key."
+ elog "This is not required if you want an unlisted private server with"
+ elog "[DoUplink=False]."
+}