diff options
author | James Le Cuirot <chewi@gentoo.org> | 2020-03-31 22:52:22 +0100 |
---|---|---|
committer | James Le Cuirot <chewi@gentoo.org> | 2020-03-31 22:54:38 +0100 |
commit | 32303459a081de5445c064e4cbffac30fe288d24 (patch) | |
tree | 5089f6c14c2dc7b68f0d220e30d4a0c4777089cc /games-fps | |
parent | sys-cluster/kubernetes: add 1.17.4 (diff) | |
download | gentoo-32303459a081de5445c064e4cbffac30fe288d24.tar.gz gentoo-32303459a081de5445c064e4cbffac30fe288d24.tar.bz2 gentoo-32303459a081de5445c064e4cbffac30fe288d24.zip |
games-fps/ut2003: Fix SRC_URI, EAPI 7, fix server, align with UT2004
Closes: https://bugs.gentoo.org/715540
Package-Manager: Portage-2.3.96, Repoman-2.3.20
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Diffstat (limited to 'games-fps')
-rw-r--r-- | games-fps/ut2003/Manifest | 2 | ||||
-rw-r--r-- | games-fps/ut2003/files/ut2003-ded.confd | 6 | ||||
-rw-r--r-- | games-fps/ut2003/files/ut2003-ded.initd | 13 | ||||
-rw-r--r-- | games-fps/ut2003/ut2003-2225-r4.ebuild | 99 | ||||
-rw-r--r-- | games-fps/ut2003/ut2003-2225-r5.ebuild | 98 |
5 files changed, 118 insertions, 100 deletions
diff --git a/games-fps/ut2003/Manifest b/games-fps/ut2003/Manifest index f580ec1670f9..dab215295219 100644 --- a/games-fps/ut2003/Manifest +++ b/games-fps/ut2003/Manifest @@ -1 +1 @@ -DIST ut2003lnx_patch2225.tar.tar 10039316 BLAKE2B a15398eb2b66606f3e7b1382b01fda6b5d38982bc3fe7065184232eb18a8c85792147187951e810ecb6af738b5f5a15a2e56832d7e91fb21ab8956d699817f76 SHA512 3c44b6254b2b778bf2aca826c710f51db4ec0687c21f1c98e1070f3a9ad7e1a809e741a5b94e20a44c56c60a8b1e4a049788ff5f2a4d581c4eedf3dbbc0da86d +DIST ut2003lnx_patch2225.tar.bz2 10039316 BLAKE2B a15398eb2b66606f3e7b1382b01fda6b5d38982bc3fe7065184232eb18a8c85792147187951e810ecb6af738b5f5a15a2e56832d7e91fb21ab8956d699817f76 SHA512 3c44b6254b2b778bf2aca826c710f51db4ec0687c21f1c98e1070f3a9ad7e1a809e741a5b94e20a44c56c60a8b1e4a049788ff5f2a4d581c4eedf3dbbc0da86d diff --git a/games-fps/ut2003/files/ut2003-ded.confd b/games-fps/ut2003/files/ut2003-ded.confd new file mode 100644 index 000000000000..e6f81661a928 --- /dev/null +++ b/games-fps/ut2003/files/ut2003-ded.confd @@ -0,0 +1,6 @@ +# User and group the server should run as. +ut2003_ded_user="nobody" +ut2003_ded_group="nobody" + +# Any extra options you want to pass to the server. +ut2003_ded_opts="DM-Antalus" diff --git a/games-fps/ut2003/files/ut2003-ded.initd b/games-fps/ut2003/files/ut2003-ded.initd new file mode 100644 index 000000000000..19c8f1ada616 --- /dev/null +++ b/games-fps/ut2003/files/ut2003-ded.initd @@ -0,0 +1,13 @@ +#!/sbin/openrc-run +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +pidfile="/var/run/${RC_SVCNAME}.pid" +command_background="true" +command_user="${ut2003_ded_user}:${ut2003_ded_group}" +command="ut2003-ded" +command_args="${ut2003_ded_opts}" + +depend() { + need net +} diff --git a/games-fps/ut2003/ut2003-2225-r4.ebuild b/games-fps/ut2003/ut2003-2225-r4.ebuild deleted file mode 100644 index 5e82f5af64dc..000000000000 --- a/games-fps/ut2003/ut2003-2225-r4.ebuild +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit eutils games - -DESCRIPTION="Sequel to the 1999 Game of the Year multi-player first-person shooter" -HOMEPAGE="http://www.unrealtournament2003.com/" -SRC_URI="ftp://ftp.infogrames.net/misc/ut2003/ut2003lnx_patch2225.tar.tar" - -LICENSE="ut2003" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="dedicated" -RESTRICT="bindist strip" - -RDEPEND=" - games-fps/ut2003-data - dedicated? ( games-server/ut2003-ded ) - !dedicated? ( virtual/opengl[abi_x86_32(-)] ) -" -DEPEND="" - -S=${WORKDIR} - -dir="${GAMES_PREFIX_OPT}/${PN}" -Ddir="${D}/${dir}" - -src_unpack() { - unpack ut2003lnx_patch${PV}.tar.tar -} - -src_install() { - insinto "${dir}" - - games_make_wrapper ut2003 ./ut2003 "${dir}" "${dir}" - make_desktop_entry ut2003 "Unreal Tournament 2003" ut2003 - - # TODO: change this to use doexe/doins - # this brings our install up to the newest version - cp -r "${S}"/ut2003-lnx-2225/* "${Ddir}" || die - - prepgamesdirs -} - -pkg_postinst() { - games_pkg_postinst - - # here is where we check for the existence of a cdkey... - # if we don't find one, we ask the user for it - if [[ -f "${dir}"/System/cdkey ]] ; then - elog "A cdkey file is already present in ${dir}/System" - else - ewarn "You MUST run this before playing the game:" - ewarn "emerge --config =${CATEGORY}/${PF}" - ewarn "That way you can (re)enter your cdkey." - fi - elog - elog "To play the game run:" - elog " ut2003" - ewarn - ewarn "If you are not installing for the first time and you plan on running" - ewarn "a server, you will probably need to edit your" - ewarn "~/.ut2003/System/UT2003.ini file and add a line that says" - ewarn "AccessControlClass=crashfix.iaccesscontrolini to your" - ewarn "[Engine.GameInfo] section to close a security issue." -} - -pkg_postrm() { - ewarn "This package leaves a cdkey file in ${dir}/System that you need" - ewarn "to remove to completely get rid of this game's files." -} - -pkg_config() { - ewarn "Your CD key is NOT checked for validity here." - ewarn " Make sure you type it in correctly." - eerror "If you CTRL+C out of this, the game will not run!" - echo - einfo "CD key format is: XXXX-XXXX-XXXX-XXXX" - while true ; do - einfo "Please enter your CD key:" - read CDKEY1 - einfo "Please re-enter your CD key:" - read CDKEY2 - if [[ "${CDKEY1}" == "" ]] ; then - echo "You entered a blank CD key. Try again." - else - if [[ "${CDKEY1}" == "${CDKEY2}" ]] ; then - echo "${CDKEY1}" | tr a-z A-Z > ${dir}/System/cdkey - einfo "Thank you!" - chown games:games "${dir}"/System/cdkey - break - else - eerror "Your CD key entries do not match. Try again." - fi - fi - done -} diff --git a/games-fps/ut2003/ut2003-2225-r5.ebuild b/games-fps/ut2003/ut2003-2225-r5.ebuild new file mode 100644 index 000000000000..9880ab073d02 --- /dev/null +++ b/games-fps/ut2003/ut2003-2225-r5.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit desktop eutils + +DESCRIPTION="Sequel to the 1999 Game of the Year multi-player first-person shooter" +HOMEPAGE="https://en.wikipedia.org/wiki/Unreal_Tournament_2003" +SRC_URI="https://ftp.snt.utwente.nl/pub/games/UT2003/Patches/Linux/${PN}lnx_patch${PV}.tar.bz2" + +LICENSE="ut2003" +SLOT="0" +KEYWORDS="-* ~amd64 ~x86" +IUSE="dedicated" +RESTRICT="bindist strip" + +RDEPEND=" + !games-server/ut2003-ded + games-fps/ut2003-data + media-libs/libsdl[abi_x86_32] + sys-libs/glibc + virtual/opengl[abi_x86_32] +" + +BDEPEND="app-admin/chrpath" + +S="${WORKDIR}/${PN}-lnx-${PV}" +DIR="/opt/${PN}" + +QA_PREBUILT="*" + +src_prepare() { + default + chrpath -d System/{{ucc,${PN}}-bin,*.so} || die +} + +src_install() { + insinto "${DIR}" + doins -r . + fperms +x "${DIR}"/System/{ucc,${PN}}-bin + + make_wrapper ${PN} ./${PN}-bin "${DIR}"/System "${DIR}"/System + make_wrapper ${PN}-ded "./ucc-bin server" "${DIR}"/System "${DIR}"/System + + make_desktop_entry ${PN} "Unreal Tournament 2003" applications-games + + newconfd "${FILESDIR}"/${PN}-ded.confd ${PN}-ded + newinitd "${FILESDIR}"/${PN}-ded.initd ${PN}-ded +} + +pkg_postinst() { + # Here is where we check for the existence of a cdkey. + # If we don't find one, we ask the user for it. + if [[ -f ${EROOT}${DIR}/System/cdkey ]] ; then + einfo "A cdkey file is already present in ${EPREFIX}${DIR}/System" + else + ewarn "You MUST run this before playing the game:" + ewarn "emerge --config =${CATEGORY}/${PF}" + ewarn "That way you can (re)enter your cdkey." + fi + ewarn + ewarn "If you are not installing for the first time and you plan on running" + ewarn "a server, you will probably need to edit your" + ewarn "~/.ut2003/System/UT2003.ini file and add a line that says" + ewarn "AccessControlClass=crashfix.iaccesscontrolini to your" + ewarn "[Engine.GameInfo] section to close a security issue." +} + +pkg_postrm() { + ewarn "This package leaves a cdkey file in ${EROOT}${DIR}/System that you need" + ewarn "to remove to completely get rid of this game's files." +} + +pkg_config() { + ewarn "Your CD key is NOT checked for validity here so" + ewarn "make sure you type it in correctly." + ewarn "If you CTRL+C out of this, the game will not run!" + echo + einfo "CD key format is: XXXX-XXXX-XXXX-XXXX" + while true ; do + einfo "Please enter your CD key:" + read CDKEY1 + einfo "Please re-enter your CD key:" + read CDKEY2 + if [[ -z ${CDKEY1} || -z ${CDKEY2} ]] ; then + echo "You entered a blank CD key. Try again." + else + if [[ ${CDKEY1} == ${CDKEY2} ]] ; then + echo "${CDKEY1^^}" > "${EROOT}${DIR}"/System/cdkey || die + einfo "Thank you!" + break + else + eerror "Your CD key entries do not match. Try again." + fi + fi + done +} |