Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 46317 Details for
Bug 74902
Updated ebuild for UT2004 , which is more user-friendly to install
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Updated UT 2004 ebuild
ut2004-3339-r1.ebuild (text/plain), 9.83 KB, created by
Chetan Chauhan
on 2004-12-18 19:12:19 UTC
(
hide
)
Description:
Updated UT 2004 ebuild
Filename:
MIME Type:
Creator:
Chetan Chauhan
Created:
2004-12-18 19:12:19 UTC
Size:
9.83 KB
patch
obsolete
># Copyright 1999-2004 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: /var/cvsroot/gentoo-x86/games-fps/ut2004/ut2004-3339.ebuild,v 1.1 2004/11/24 13:21:35 wolf31o2 Exp $ > >inherit games > >MY_P="${PN}-lnxpatch${PV}.tar.bz2" >MY_BP="${PN}-ecebonuspack.tar.bz2" >DESCRIPTION="Unreal Tournament 2004 - Editor's Choice Edition" >HOMEPAGE="http://www.unrealtournament2004.com/" >SRC_URI="mirror://3dgamers/pub/3dgamers7/games/unrealtourn2k4/${MY_P} > mirror://3dgamers/pub/3dgamers7/games/unrealtourn2k4/Missions/${MY_BP} > mirror://3dgamers/pub/3dgamers/games/unrealtourn2k4/${MY_P} > mirror://3dgamers/pub/3dgamers/games/unrealtourn2k4/Missions/${MY_BP} > http://mirror1.icculus.org/${PN}/${MY_P} > http://0day.icculus.org/${PN}/${MY_P} > http://speculum.twistedgamer.com/pub/0day.icculus.org/${PN}/${MY_P}" > >LICENSE="ut2003" >SLOT="0" >KEYWORDS="x86 amd64" >RESTRICT="nostrip nomirror" >IUSE="opengl dedicated" > >DEPEND="virtual/libc > games-util/uz2unpack" >RDEPEND="opengl? ( virtual/opengl ) > dedicated? ( app-misc/screen )" > >S=${WORKDIR} > >dir=${GAMES_PREFIX_OPT}/${PN} >Ddir=${D}/${dir} > >pkg_setup() { > check_license || die "License check failed" > ewarn "The installed game takes about 6.8GB of space!" > > # new workaround to installation added by Pkunk > > if [ "${UT_INSTALL_TEMP}" = "" ] > then > # die "Please run emerge with UT 2004 with - UT_INSTALL_TEMP=/opt/wherever emerge UT2004" > UT_INSTALL_TEMP="/opt/ut2004.inst-temp" > ewarn "UT_INSTALL_TEMP not set. defaulting to ${UT_INSTALL_TEMP}" > fi > > #D="${UT_INSTALL_TEMP}" > > mkdir "${UT_INSTALL_TEMP}" || die "Unable to create ${UT_INSTALL_TEMP} or folder already exists. Please rmdir it to continue" > mkdir "${UT_INSTALL_TEMP}/image" > mkdir "${UT_INSTALL_TEMP}/work" > chown -R portage:portage "${UT_INSTALL_TEMP}" > > # The following is a nasty mess to determine if we are installing from > # a DVD or from multiple CDs. Anyone feel free to submit patches to this > # to bugs.gentoo.org as I know it is a very ugly hack. > USE_DVD= > if [ -n "${CD_ROOT}" ] > then > [ -d "${CD_ROOT}/CD1" ] && USE_DVD=1 > else > local mline="" > for mline in `mount | egrep -e '(iso|cdrom)' | awk '{print $3}'` > do > [ -d "${mline}/CD1" ] && USE_DVD=1 > done > fi > if [ ${USE_DVD} ] > then > DISK1="CD1/" > DISK2="CD2/" > DISK3="CD3/" > DISK4="CD4/" > DISK5="CD5/" > DISK6="CD6/" > fi > cdrom_get_cds ${DISK1}System/UT2004.ini \ > ${DISK2}Textures/2K4Fonts.utx.uz2 \ > ${DISK3}Textures/ONSDeadVehicles-TX.utx.uz2 \ > ${DISK4}Music/KR-UT2004-Menu.ogg \ > ${DISK5}Speech/ons.xml ${DISK6}/DirectX9/BDA.cab > > games_pkg_setup >} > >src_unpack() { > #cd "${WORKDIR}/.." > #rmdir "${S}" > #ln -s ${UT_INSTALL_TEMP}/work ${S} > #cd "${S}" > umount ${S} > cd ${D} > mount --bind ${UT_INSTALL_TEMP}/work ${S} > cd ${S} > > hasq "sandbox" ${FEATURES} && \ > die "You need to disable sandbox to install this. Try FEATURES="-sandbox" emerge ut2004" > ewarn "Installing from CD in ${CDROM_ROOT} . To override , use CDROM_ROOT=/mnt/wherever emerge ut2004" > unpack_makeself ${CDROM_ROOT}/linux-installer.sh \ > || die "unpacking linux installer" > use x86 && tar -xf ${S}/linux-x86.tar > use amd64 && tar -xf ${S}/linux-amd64.tar > unpack ${MY_P} > unpack ${MY_BP} >} > >copy_error() { >echo "Running ${UT_CP_COMMAND}" >while bash -c "${UT_CP_COMMAND}" > [ $? != "0" ] > do > ewarn "Error copying files , Check if $UT_CURRENT_DISC is inserted in ${CDROM_ROOT}" > einfo "Press return to retry copying files" > read ># echo "Retrying after 60 seconds. Press any key to stop waiting" ># for ((sec=60;sec>0;sec--)) ># do ># echo -n -e "Retrying in ${sec} seconds. \r" ># KEY_PRESSED="" ># sleep 1 ># read -t 1 KEY_PRESSED ># if [ "$KEY_PRESSED" != "" ]; then ># sec=0 ># fi ># done ># echo "Retrying now" > done >} > >src_install() { > umount ${D} > mkdir ${D} > cd ${S} > mount --bind ${UT_INSTALL_TEMP}/image ${D} > cd ${D} > > dodir ${dir}/System/editorres > > UT_CURRENT_DISC="Disc 1" > # Disk 1 > einfo "Copying files from ${UT_CURRENT_DISC}..." > UT_CP_COMMAND="cp -r ${CDROM_ROOT}/${DISK1}/{Animations,ForceFeedback,Help,KarmaData,Maps,Sounds,Web} ${Ddir}" > copy_error > UT_CP_COMMAND="cp -r ${CDROM_ROOT}/${DISK1}System/{editorres,*.{bat,bmp,dat,det,est,frt,ini,int,itt,kot,md5,smt,tmt,u,ucl,upl,url}} ${Ddir}/System" > copy_error > mkdir -p ${Ddir}/Manual || die "creating manual folder" > UT_CP_COMMAND="cp ${CDROM_ROOT}/${DISK1}Manual/Manual.pdf ${Ddir}/Manual" > copy_error > mkdir -p ${Ddir}/Benchmark/Stuff || die "creating benchmark folders" > UT_CP_COMMAND="cp -r ${CDROM_ROOT}/${DISK1}Benchmark/Stuff/* ${Ddir}/Benchmark/Stuff" > copy_error > cdrom_load_next_cd > > UT_CURRENT_DISC="Disc 2" > # Disk 2 > einfo "Copying files from Disk 2..." > UT_CP_COMMAND="cp -r ${CDROM_ROOT}/${DISK2}{Sounds,Textures} ${Ddir}" > copy_error > cdrom_load_next_cd > > UT_CURRENT_DISC="Disc 3" > # Disk 3 > einfo "Copying files from Disk 3..." > UT_CP_COMMAND="cp -r ${CDROM_ROOT}/${DISK3}Textures ${Ddir}" > copy_error > cdrom_load_next_cd > > UT_CURRENT_DISC="Disc 4" > #Disk 4 > einfo "Copying files from Disk 4..." > UT_CP_COMMAND="cp -r ${CDROM_ROOT}/${DISK4}{Music,StaticMeshes,Textures} ${Ddir}" > copy_error > cdrom_load_next_cd > > UT_CURRENT_DISC="Disc 5" > #Disk 5 > einfo "Copying files from Disk 5..." > UT_CP_COMMAND="cp -r ${CDROM_ROOT}/${DISK5}{Music,Speech,Sounds} ${Ddir}" > copy_error > cdrom_load_next_cd > > UT_CURRENT_DISC="Disc 6" > #Disk 6 > einfo "Copying files from Disk 6..." > UT_CP_COMMAND="cp -r ${CDROM_ROOT}/${DISK6}Sounds ${Ddir}" > copy_error > > # 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 > > # install extra help files > insinto ${dir}/Help > doins ${S}/Unreal.bmp ${S}/UT2004Logo.bmp > > # install eula > insinto ${dir} > doins ${S}/UT2004_EULA.txt > > # install System.inis > insinto ${dir}/System > doins ${S}/ini-{det,est,frt,int,itt,kot,smt,tmt}.tar > > # copy ut2004 > exeinto ${dir} > doexe ${S}/bin/ut2004 || die "copying ut2004" > > exeinto ${dir}/System > doexe ${S}/System/{libSDL-1.2.so.0,openal.so,u{cc,t2004}-bin} \ > || die "copying libs/ucc/ut2004" > > # Removing uneccessary files in Sounds > rm -f ${Ddir}/Sounds/*.{det,est,frt,itt,kot,smt,tmt}_uax.uz2 > > # Installing patch files (first time) for decompress > cp ${S}/UT2004-Patch/System/* ${Ddir}/System > use amd64 && rm ${Ddir}/System/ucc-bin && \ > mv ${Ddir}/System/ucc-bin-linux-amd64 ${Ddir}/System/ucc-bin > > # uncompressing files > einfo "Uncompressing files... this *will* take a while..." > for j in {Animations,Maps,Sounds,StaticMeshes,Textures} > do > chmod -R u+w ${Ddir}/${j} || die "chmod in uncompress" > games_ut_unpack ${Ddir}/${j} || die "uncompressing files" > done > > # Installing Editor's Choice Edition > for n in {Animations,Help,Manual,Maps,Sounds,StaticMeshes,System,Textures} > do > cp -r ${S}/${PN}-ECEBonusPack/${n}/* ${Ddir}/${n} \ > || die "copying ${n} from Editor's Choice Edition" > done > > # Installing patch files > for p in {Animations,Help,Speech,System,Textures,Web} > do > cp -r ${S}/UT2004-Patch/${p}/* ${Ddir}/${p} \ > || die "copying ${p} from patch" > done > > use amd64 && rm ${Ddir}/System/u{cc,t2004}-bin \ > && mv ${Ddir}/System/ucc-bin-linux-amd64 ${Ddir}/System/ucc-bin \ > && mv ${Ddir}/System/ut2004-bin-linux-amd64 ${Ddir}/System/ut2004-bin \ > && chmod ug+x ${Ddir}/System/ucc-bin ${Ddir}/System/ut2004-bin > use x86 && rm ${Ddir}/System/ucc-bin-linux-amd64 \ > ${Ddir}/System/ut2004-bin-linux-amd64 > > # Removing unneccessary files in System and Help > rm -f ${Ddir}/Help/{InstallerLogo.bmp,SAPI-EULA.txt,{Unreal,UnrealEd}.ico} > rm -f ${Ddir}/System/*.tar > rm -f ${Ddir}/System/{{License,Manifest}.smt,{ucc,StdOut}.log,{User,UT2004}.ini} > > # installing documentation/icon > dodoc ${S}/README.linux || die "dodoc README.linux" > insinto /usr/share/pixmaps; > doins ${S}/ut2004.xpm || die "copying pixmap" > insinto ${dir} > doins ${S}/README.linux ${S}/ut2004.xpm || die "copying readme/icon" > > # creating .manifest files > insinto ${dir}/.manifest > doins ${FILESDIR}/${PN}.xml > > # creating .loki/installed links > mkdir -p ${D}/root/.loki/installed > dosym ${dir}/.manifest/${PN}.xml /root/.loki/installed/${PN}.xml > > games_make_wrapper ut2004 ./ut2004 ${dir} > > # now, since these files are coming off a cd, the times/sizes/md5sums wont > # be different ... that means portage will try to unmerge some files (!) > # we run touch on ${D} so as to make sure portage doesnt do any such thing > find ${Ddir} -exec touch '{}' \; > > prepgamesdirs > make_desktop_entry ut2004 "Unreal Tournament 2004" ut2004.xpm >} > >pkg_postinst() { > games_pkg_postinst > > umount ${S} > umount ${D} > > ewarn "There might be some leftover temp. files in $UT_INSTALL_TEMP. It should be safe to delete them" > > # 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 > einfo "A cdkey file is already present in ${dir}/System" > else > ewarn "You MUST run this before playing the game:" > ewarn "ebuild /var/db/pkg/${CATEGORY}/${PF}/${PF}.ebuild config" > ewarn "That way you can [re]enter your cdkey." > fi > echo > einfo "To play the game run:" > einfo " ut2004" > echo >} > >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: XXXXX-XXXXX-XXXXX-XXXXX" > 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!" > break > else > eerror "Your CD key entries do not match. Try again." > fi > fi > done >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 74902
: 46317 |
47585