forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
games-server/ut2004-ded: EAPI 7, drop games eclass, misc improvements
This now blocks games-server/ut2004(-data) entirely rather than just the dedicated USE flag. This allows both to be installed to /opt/ut2004, vastly simplying the related ebuilds. This was admittedly done in a hurry but it seems to work. I have chosen nobody:nobody for the server user and group because I don't have time to formally request one. This may be sufficient anyway. Also fixes collision with games-fps/ut2004-bonuspack-ece. Closes: https://bugs.gentoo.org/594642 Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: James Le Cuirot <[email protected]>
- Loading branch information
Showing
4 changed files
with
99 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 $? | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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]." | ||
} |