# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # Header: $ inherit games ASU_VER="0.6" DESCRIPTION="Unreal Tournament 99 Linux Dedicated Server" HOMEPAGE="http://www.unrealtournament.com http://utpg.org" SRC_URI="http://files.unrealgamers.net/ut-server-436.tar.gz http://www.utpg.org/patches/UTPGPatch${PV}.tar.bz2 asu? ( http://www.servern.nu/frty/download/UT/asu-${ASU_VER}.tar.gz) bonuspacks? ( http://downloads.unrealtournament.com/utgoty/UTBonusPack1.zip ) bonuspacks? ( http://downloads.unrealtournament.com/utgoty/UTBonusPack2.zip ) bonuspacks? ( http://downloads.unrealtournament.com/utgoty/UTInoxxPack.zip ) bonuspacks? ( http://downloads.unrealtournament.com/utgoty/UTBonusPack4.zip )" LICENSE="as-is" SLOT="0" KEYWORDS="~amd64 ~x86 -*" IUSE="asu bonuspacks" DEPEND="app-arch/unzip x11-libs/libX11 media-libs/libsdl bonuspacks? ( games-util/umodpack )" RDEPEND="${DEPEND}" S="${WORKDIR}" # Preparing UT99 directory UT99DIR="${GAMES_PREFIX_OPT}/${PN}" src_install() { einfo "Installing UT99 dedicated server files ..." # Preparing UT99 directory dodir ${UT99DIR} # Main server files cp -rf ${S}/ut-server/* ${D}/${UT99DIR}/ && rm -R ${S}/ut-server/ # All four bonuspacks if use bonuspacks; then # Bonuspack 1 einfo "Installing bonuspack 1 ..." umod -v -f -b ${D}/${UT99DIR}/ -x ${S}/UTBonusPack.umod || die "Could not unpack UTBonusPack.umod" # Bonuspack 2 einfo "Installing bonuspack 2 ..." umod -v -f -b ${D}/${UT99DIR}/ -x ${S}/DE.umod || die "Could not unpack DE.umod" mv ${S}/CTF-HallOfGiants.unr ${D}/${UT99DIR}/Maps/ && mv ${S}/CTF-Orbital.unr ${D}/${UT99DIR}/Maps/ # Bonuspack 3 einfo "Installing bonuspack 3 ..." umod -v -f -b ${D}/${UT99DIR}/ -x ${S}/UTInoxxPack.umod || die "Could not unpack UTBonusPack3.umod" # Bonuspack 4 einfo "Installing bonuspack 4 ..." umod -v -f -b ${D}/${UT99DIR}/ -x ${S}/UTBonusPack4.umod || die "Could not unpack UTBonusPack4.umod" # remove *.umod rm ${S}/*.umod fi # UT99 v451 patch einfo "Installing UT99 v451 patch ..." rm ${S}/checkfiles.sh && rm ${S}/patch.md5 cp -rf ${S}/* ${D}/${UT99DIR}/ # ASU tool - bash script for creating server config if use asu; then einfo "Installing ASU ${ASU_VER}" chmod 755 ${D}/${UT99DIR}/asu.sh fi # /etc/init.d/ut99-ded einfo "Installing UT99 start script ..." exeinto /etc/init.d newexe ${FILESDIR}/ut99-ded.initd ut99-ded # /etc/conf.d/ut99-ded einfo "Installing UT99 config script ..." exeinto /etc/conf.d newexe ${FILESDIR}/ut99-ded.confd ut99-ded prepgamesdirs } pkg_postinst() { games_pkg_postinst echo "" einfo "The server can be started with the /etc/init.d/ut99-ded script." einfo "The Server options are stored in /etc/conf.d/ut99-ded" 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 "/opt/ut99-ded/System/Default.ini" echo "" if use asu; then einfo "You enable the 'asu' USE Flag!" einfo "Use the asu.sh script, stored in /opt/ut99-ded," einfo "to create a valid serverconfig!" fi if !use bonuspacks; then einfo "You disabled the 'bonuspacks' USE flag!" einfo "If you want to install the offical bonuspacks," einfo "enable the 'bonuspacks' USE flag!" fi }