diff options
author | Tristan Heaven <nyhm@gentoo.org> | 2009-10-12 00:54:18 +0000 |
---|---|---|
committer | Tristan Heaven <nyhm@gentoo.org> | 2009-10-12 00:54:18 +0000 |
commit | 6de6678517dd253698a591b9a407452598cb9f26 (patch) | |
tree | 71ee3ff4e2e51cd2a89a75817fae488f413c10e6 | |
parent | Install ut2004-ded wrapper when USE=dedicated for "ucc-bin server"; allow ins... (diff) | |
download | gentoo-2-6de6678517dd253698a591b9a407452598cb9f26.tar.gz gentoo-2-6de6678517dd253698a591b9a407452598cb9f26.tar.bz2 gentoo-2-6de6678517dd253698a591b9a407452598cb9f26.zip |
Install ut2004-ded wrapper for "ucc-bin server"; depend on ut2004-bonuspack-{ece,mega} and remove files which are replaced by them to prevent collisons; improve init script
(Portage version: 2.2_rc45/cvs/Linux x86_64, RepoMan options: --force)
-rw-r--r-- | games-server/ut2004-ded/ChangeLog | 12 | ||||
-rw-r--r-- | games-server/ut2004-ded/files/ut2004-ded.confd | 9 | ||||
-rw-r--r-- | games-server/ut2004-ded/files/ut2004-ded.initd | 15 | ||||
-rw-r--r-- | games-server/ut2004-ded/files/ut2004-ded.rc | 40 | ||||
-rw-r--r-- | games-server/ut2004-ded/ut2004-ded-3369.3-r1.ebuild (renamed from games-server/ut2004-ded/ut2004-ded-3369.3.ebuild) | 30 | ||||
-rw-r--r-- | games-server/ut2004-ded/ut2004-ded-3369.ebuild | 80 |
6 files changed, 49 insertions, 137 deletions
diff --git a/games-server/ut2004-ded/ChangeLog b/games-server/ut2004-ded/ChangeLog index 3caf582f364e..386a57783c01 100644 --- a/games-server/ut2004-ded/ChangeLog +++ b/games-server/ut2004-ded/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for games-server/ut2004-ded # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/games-server/ut2004-ded/ChangeLog,v 1.22 2009/09/03 12:37:38 nyhm Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-server/ut2004-ded/ChangeLog,v 1.23 2009/10/12 00:54:18 nyhm Exp $ + +*ut2004-ded-3369.3-r1 (12 Oct 2009) + + 12 Oct 2009; Tristan Heaven <nyhm@gentoo.org> files/ut2004-ded.confd, + -ut2004-ded-3369.ebuild, files/ut2004-ded.initd, + -ut2004-ded-3369.3.ebuild, -files/ut2004-ded.rc, + +ut2004-ded-3369.3-r1.ebuild: + Install ut2004-ded wrapper for "ucc-bin server"; depend on + ut2004-bonuspack-{ece,mega} and remove files which are replaced by them to + prevent collisons; improve init script *ut2004-ded-3369.3 (03 Sep 2009) diff --git a/games-server/ut2004-ded/files/ut2004-ded.confd b/games-server/ut2004-ded/files/ut2004-ded.confd index 5ae995e94ddc..a485b12d221e 100644 --- a/games-server/ut2004-ded/files/ut2004-ded.confd +++ b/games-server/ut2004-ded/files/ut2004-ded.confd @@ -1,6 +1,9 @@ # User and group the server should run as -UT2004_DED_USER="@USER@" -UT2004_DED_GROUP="@GROUP@" +ut2004_ded_user="@USER@" +ut2004_ded_group="@GROUP@" + +# Directory to use for HOME +ut2004_ded_home="@HOME@" # Any extra options you want to pass to the server -UT2004_DED_OPTS="DM-Deck17 -nohomedir -ini=Default.ini -log=/dev/null" +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 c7c08fa0d1fb..5f4094593acf 100644 --- a/games-server/ut2004-ded/files/ut2004-ded.initd +++ b/games-server/ut2004-ded/files/ut2004-ded.initd @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-server/ut2004-ded/files/ut2004-ded.initd,v 1.1 2009/09/03 12:37:39 nyhm Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-server/ut2004-ded/files/ut2004-ded.initd,v 1.2 2009/10/12 00:54:17 nyhm Exp $ depend() { need net @@ -9,15 +9,18 @@ depend() { start() { ebegin "Starting ut2004-ded" - start-stop-daemon --start --quiet --background \ - --chuid ${UT2004_DED_USER}:${UT2004_DED_GROUP} \ - --chdir "@DIR@" --exec "@DIR@/ucc-bin" -- \ - server ${UT2004_DED_OPTS} + 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 --quiet --exec "@DIR@/ucc-bin" + start-stop-daemon --stop \ + --pidfile /var/run/ut2004-ded.pid eend $? } diff --git a/games-server/ut2004-ded/files/ut2004-ded.rc b/games-server/ut2004-ded/files/ut2004-ded.rc deleted file mode 100644 index 23939b49039d..000000000000 --- a/games-server/ut2004-ded/files/ut2004-ded.rc +++ /dev/null @@ -1,40 +0,0 @@ -#!/sbin/runscript - -# UT2004 Dedicated Server Runscript by Ken Smith - -# Change the following two variables to customize this script. The default -# script starts up a Onslaught Server. -# Goto http://www.unrealadmin.org to learn how to edit your options - -UCCDIR="GAMES_PREFIX_OPT/ut2004-ded/System" -OPTIONS="server ONS-Torlan?game=Onslaught.ONSOnslaughtGame ini=Default.ini log=server.log -nohomedir" - -### Do not edit below here or the world will explode ### - -depend() { - need net -} - -start() { - ebegin "Starting UT2004 Dedicated Server" - cd ${UCCDIR} - start-stop-daemon --chdir ${UCCDIR} --env PWD=${UCCDIR} --make-pidfile --start --quiet --pidfile /var/run/ucc-bin.pid --exec ucc-bin -- ${OPTIONS} >> /dev/null & - eend $? "Failed to start UT2004 Dedicated Server" -} - -stop() { - ebegin "Stopping UT2004 Dedicated Server" - start-stop-daemon --stop --quiet --pidfile /var/run/ucc-bin.pid -- >> /dev/null - eend $? "Failed to stop UT2004 Dedicated Server" - sleep 1 -} - -reload() { - if [[ ! -f /var/run/ucc-bin.pid ]] ; then - eerror "UT2004 Dedicated Server isn't running" - return 1 - fi - ebegin "Reloading UT2004 Dedicated Server" - kill -HUP `cat /var/run/ucc-bin.pid` &>/dev/null - eend $? -} diff --git a/games-server/ut2004-ded/ut2004-ded-3369.3.ebuild b/games-server/ut2004-ded/ut2004-ded-3369.3-r1.ebuild index d9325f0930c0..0754be3c6dc8 100644 --- a/games-server/ut2004-ded/ut2004-ded-3369.3.ebuild +++ b/games-server/ut2004-ded/ut2004-ded-3369.3-r1.ebuild @@ -1,7 +1,8 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-server/ut2004-ded/ut2004-ded-3369.3.ebuild,v 1.1 2009/09/03 12:37:38 nyhm Exp $ +# $Header: /var/cvsroot/gentoo-x86/games-server/ut2004-ded/ut2004-ded-3369.3-r1.ebuild,v 1.1 2009/10/12 00:54:18 nyhm Exp $ +EAPI=2 inherit games BONUSPACK_P="dedicatedserver3339-bonuspack.zip" @@ -18,22 +19,24 @@ SRC_URI="mirror://3dgamers/unrealtourn2k4/${BONUSPACK_P} LICENSE="ut2003" SLOT="0" -KEYWORDS="~amd64 ~x86" +KEYWORDS="amd64 x86" IUSE="" RESTRICT="mirror strip" PROPERTIES="interactive" DEPEND="app-arch/unzip app-arch/p7zip" -RDEPEND="sys-libs/glibc" +RDEPEND="sys-libs/glibc + !games-fps/ut2004[dedicated] + games-fps/ut2004-bonuspack-ece + games-fps/ut2004-bonuspack-mega" S=${WORKDIR} GAMES_CHECK_LICENSE="yes" dir=${GAMES_PREFIX_OPT}/${PN} -src_unpack() { - unpack ${A} +src_prepare() { cp -rf UT2004-Patch/* . || die rm -rf System/{ucc-bin*,ut2004-bin*,*.dll,*.exe} UT2004-Patch if use amd64 ; then @@ -42,11 +45,24 @@ src_unpack() { 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 * || die "doins failed" fperms +x "${dir}"/System/ucc-bin || die "fperms failed" @@ -54,12 +70,13 @@ src_install() { sed \ -e "s:@USER@:${GAMES_USER_DED}:" \ -e "s:@GROUP@:${GAMES_GROUP}:" \ + -e "s:@HOME@:${GAMES_PREFIX}:" \ "${FILESDIR}"/${PN}.confd > "${T}"/${PN}.confd \ || die "sed confd failed" newconfd "${T}"/${PN}.confd ${PN} || die "newconfd failed" sed \ - -e "s:@DIR@:${dir}/System:g" \ + -e "s:@DIR@:${GAMES_BINDIR}:g" \ "${FILESDIR}"/${PN}.initd > "${T}"/${PN}.initd \ || die "sed initd failed" newinitd "${T}"/${PN}.initd ${PN} || die "initd failed" @@ -69,7 +86,6 @@ src_install() { pkg_postinst() { games_pkg_postinst - elog "The server can be started using the /etc/init.d/ut2004-ded script." ewarn "You should take the time to edit the default server INI." ewarn "Consult the INI Reference at http://unrealadmin.org/" ewarn "for assistance in adjusting the following file:" diff --git a/games-server/ut2004-ded/ut2004-ded-3369.ebuild b/games-server/ut2004-ded/ut2004-ded-3369.ebuild deleted file mode 100644 index 2d4003a68dad..000000000000 --- a/games-server/ut2004-ded/ut2004-ded-3369.ebuild +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/games-server/ut2004-ded/ut2004-ded-3369.ebuild,v 1.12 2009/04/14 07:30:35 mr_bones_ Exp $ - -inherit games - -DESCRIPTION="Unreal Tournament 2004 Linux Dedicated Server" -HOMEPAGE="http://www.unrealtournament.com/" - -MY_P="dedicatedserver3339-bonuspack.zip" -MY_P2="ut2004-lnxpatch${PV}-2.tar.bz2" -SRC_URI="mirror://3dgamers/unrealtourn2k4/${MY_P} - http://downloads.unrealadmin.org/UT2004/Patches/Linux/${MY_P} - http://sonic-lux.net/data/mirror/ut2004/${MY_P} - mirror://3dgamers/unrealtourn2k4/${MY_P2} - http://downloads.unrealadmin.org/UT2004/Server/${MY_P2} - http://sonic-lux.net/data/mirror/ut2004/${MY_P2}" - -LICENSE="ut2003" -SLOT="0" -KEYWORDS="amd64 x86" -IUSE="" -RESTRICT="mirror strip" -PROPERTIES="interactive" - -DEPEND="app-arch/unzip" -RDEPEND="=virtual/libstdc++-3.3" - -S=${WORKDIR} - -GAMES_CHECK_LICENSE="yes" -dir=${GAMES_PREFIX_OPT}/${PN} -Ddir=${D}/${dir} - -src_install() { - einfo "This will take a while ... go get a pizza or something" - - dodir ${dir} - cp -r ${S}/UT2004-Patch/* ${S} - rm -rf ${S}/UT2004-Patch - cp -r ${S}/* ${Ddir} - - if use amd64 ; then - rm ${Ddir}/System/ucc-bi{n,n-macosx} \ - || die "removing unused binaries" - mv ${Ddir}/System/ucc-bin-linux-amd64 ${Ddir}/System/ucc-bin \ - || die "renaming ucc-bin-amd64 => ucc-bin" - else - rm ${Ddir}/System/ucc-bin-{linux-amd64,macosx} \ - || die "removing unused binaries" - fi - - fperms 0770 ${dir}/System/ucc-bin || die "fixing permissions on ucc-bin" - rm -f ${Ddir}/System/*.dll || die "removing windows dlls" - rm -f ${Ddir}/System/*.exe || die "removing windows exes" - - newinitd ${FILESDIR}/ut2004-ded.rc ut2004-ded - dosed "s:GAMES_PREFIX_OPT:${GAMES_PREFIX_OPT}:" \ - /etc/init.d/ut2004-ded || die "sed" - - prepgamesdirs -} - -pkg_postinst() { - games_pkg_postinst - elog "The server can be started with the /etc/init.d/ut2004-ded init script." - echo - ewarn "You should take the time to edit the default server INI." - ewarn "Consult the INI Reference at http://unrealadmin.org/" - ewarn "for assistance in adjusting the following file:" - ewarn " ${GAMES_PREFIX_OPT}/ut2004-ded/System/Default.ini" - echo - ewarn "NOTE: 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]" - echo - ewarn " http://unreal.epicgames.com/ut2004server/cdkey.php" - echo -} |