# Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/games-fps/ut2003/ut2003-2225-r3.ebuild,v 1.2 2004/09/01 20:27:08 wolf31o2 Exp $ inherit games DESCRIPTION="Unreal Tournament 2003 - Sequel to the 1999 Game of the Year multi-player first-person shooter" HOMEPAGE="http://www.unrealtournament2003.com/" SRC_URI="http://unreal.epicgames.com/linux/ut2003/${PN}lnx_2107to${PV}.sh.bin ftp://david.hedbor.org/ut2k3/updates/${PN}lnx_2107to${PV}.sh.bin http://download.factoryunreal.com/mirror/UT2003CrashFix.zip" LICENSE="ut2003" SLOT="0" KEYWORDS="x86" IUSE="dedicated" RESTRICT="nostrip" DEPEND="virtual/libc app-arch/unzip games-util/uz2unpack" RDEPEND="dedicated? ( games-server/ut2003-ded ) !dedicated? ( virtual/opengl )" S="${WORKDIR}" dir="${GAMES_PREFIX_OPT}/${PN}" pkg_setup() { check_license || die "License check failed" ewarn "The installed game takes about 2.7GB of space!" cdrom_get_cds System/Packages.md5 StaticMeshes/AWHardware.usx.uz2 \ Extras/MayaPLE/Maya4PersonalLearningEditionEpic.exe games_pkg_setup } src_unpack() { unpack_makeself ${DISTDIR}/${PN}lnx_2107to${PV}.sh.bin \ || die "unpacking patch" unzip ${DISTDIR}/UT2003CrashFix.zip \ || die "unpacking crash-fix" } src_install() { local Ddir="${D}/${dir}" dodir ${dir}/System # Disk 1 einfo "Copying files from Disk 1..." cp -r ${CDROM_ROOT}/{Animations,ForceFeedback,Help,KarmaData,Maps,Sounds,Textures,Web} ${Ddir} || die "copying files" cp -r ${CDROM_ROOT}/System/{editorres,*.{bmp,dat,det,est,frt,ini,int,itt,md5,u,upl,url}} ${Ddir}/System || die "copying files" mkdir -p ${Ddir}/Benchmark/Stuff || die "creating benchamrk folders" cp -r ${CDROM_ROOT}/Benchmark/Stuff/* ${Ddir}/Benchmark/Stuff || die "copying benchmark files" cdrom_load_next_cd # Disk 2 einfo "Copying files from Disk 2..." cp -r ${CDROM_ROOT}/{Music,Sounds,StaticMeshes,Textures} ${Ddir} || die "copying files" cdrom_load_next_cd # Disk 3 einfo "Copying files from Disk 3..." cp -r ${CDROM_ROOT}/Sounds ${Ddir} || die "copying files" # create empty files in Benchmark for j in {CSVs,Logs,Results} ; do mkdir -p ${Ddir}/Benchmark/${j} || die "creating folders" touch ${Ddir}/Benchmark/${j}/DO_NOT_DELETE.ME || die "creating files" done # remove Default, DefUser, UT2003 and User ini files rm ${Ddir}/System/{Def{ault,User},UT2003,User}.ini || die "deleting ini files" # unpack_makeself won't take absolute path unpack_makeself ${CDROM_ROOT}/linux_installer.sh || die "unpacking linux installer" # install extra help files insinto ${dir}/Help doins ${S}/Help/Unreal.bmp # install Default and DefUser ini files insinto ${dir}/System doins ${S}/System/Def{ault,User}.ini # install eula insinto ${dir} doins ${S}/eula/License.int # uncompress original binaries/libraries tar -xf ut2003lnxbins.tar || die "unpacking original binaries/libraries" # copying extra/updater cp -r ${S}/{extras,updater} ${Ddir} || die "copying extras/updater" # install benchmarks cp -r ${S}/Benchmark ${Ddir} || die "copying benchmark files" # copy ut2003/ucc exeinto ${dir} doexe ${S}/bin/ut2003 ${S}/ucc || die "copying ut2003/ucc" # copy binaries/libraries exeinto ${dir}/System doexe ${S}/System/{*-bin,*.so.0,*.so} || die "copying system binaries/libraries" # uncompressing files einfo "Uncompressing files... this may take a while..." for j in {Animations,Maps,Sounds,StaticMeshes,Textures} ; do games_ut_unpack ${Ddir}/${j} || die "uncompressing files" done # installing documentation/icon dodoc ${S}/README.linux || die "dodoc README.linux" insinto /usr/share/pixmaps ; newins ${S}/Unreal.xpm UT2003.xpm || die "copying pixmap" insinto ${dir} doins ${S}/README.linux ${S}/Unreal.xpm || die "copying readme/icon" games_make_wrapper ut2003 ./ut2003 ${dir} # this brings our install up to the newest version cd ${S} bin/Linux/x86/loki_patch --verify patch.dat || die "verifying patch" bin/Linux/x86/loki_patch patch.dat ${Ddir} >& /dev/null || die "patching" # Here we apply DrSiN's crash patch cp ${S}/CrashFix/System/crashfix.u ${Ddir}/System ed ${Ddir}/System/Default.ini >/dev/null 2>&1 < ${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 }