diff options
author | Chris Gianelloni <wolf31o2@gentoo.org> | 2007-07-12 23:57:42 +0000 |
---|---|---|
committer | Chris Gianelloni <wolf31o2@gentoo.org> | 2007-07-12 23:57:42 +0000 |
commit | 028a60be5243e03d07b8c140dd21fa9d31630f45 (patch) | |
tree | 2d325229985b39dc047ab72ed7bf66a4b198e18b /eclass/games-ut2k4mod.eclass | |
parent | Marking 1.0.0.11-r1 and 1.0.0.13-r1 stable on amd64/x86 since the changes fro... (diff) | |
download | historical-028a60be5243e03d07b8c140dd21fa9d31630f45.tar.gz historical-028a60be5243e03d07b8c140dd21fa9d31630f45.tar.bz2 historical-028a60be5243e03d07b8c140dd21fa9d31630f45.zip |
Added two new mirrors and also made sure to add the obselete directory, in case a newer version comes out before we can update the eclass.
Diffstat (limited to 'eclass/games-ut2k4mod.eclass')
-rw-r--r-- | eclass/games-ut2k4mod.eclass | 113 |
1 files changed, 60 insertions, 53 deletions
diff --git a/eclass/games-ut2k4mod.eclass b/eclass/games-ut2k4mod.eclass index 7a01b96fc98b..71e7bdca5154 100644 --- a/eclass/games-ut2k4mod.eclass +++ b/eclass/games-ut2k4mod.eclass @@ -1,10 +1,9 @@ -# Copyright 1999-2004 Gentoo Foundation +# Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/games-ut2k4mod.eclass,v 1.10 2007/03/07 15:23:39 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/games-ut2k4mod.eclass,v 1.11 2007/07/12 23:57:42 wolf31o2 Exp $ inherit games - EXPORT_FUNCTIONS pkg_nofetch src_unpack src_install pkg_postinst DESCRIPTION="UT2004 - ${MOD_DESC}" @@ -15,7 +14,6 @@ IUSE="" DEPEND="app-arch/tar app-arch/bzip2" - RDEPEND="sys-libs/glibc" PDEPEND=">=games-fps/ut2004-3339" @@ -27,93 +25,102 @@ check_dvd() { # 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= USE_ECE_DVD= - if [[ -n "${CD_ROOT}" ]] - then - [[ -d "${CD_ROOT}/CD1" ]] && USE_DVD=1 - [[ -d "${CD_ROOT}/CD7" ]] && USE_ECE_DVD=1 - else - local mline="" - for mline in `mount | egrep -e '(iso|cdrom)' | awk '{print $3}'` - do - [[ -d "${mline}/CD1" ]] && USE_DVD=1 - [[ -d "${mline}/CD7" ]] && USE_ECE_DVD=1 - done - fi + USE_MIDWAY_DVD= + USE_GERMAN_MIDWAY_DVD= + + local r + for r in "${CD_ROOT}" "${CD_ROOT_1}" \ + `mount | egrep -e '(iso|cdrom)' | awk '{print $3}'` ; do + if [[ -n "${r}" ]] ; then + einfo "Searching ${r}" + if [[ -e "${r}/AutoRunData/Unreal.ico" ]] \ + && [[ -e "${r}/Disk5/data6.cab" ]] ; then + USE_MIDWAY_DVD=1 + USE_DVD=1 + elif [[ -e "${r}/autorund/unreal.ico" ]] \ + && [[ -e "${r}/disk7/data8.cab" ]] ; then + USE_MIDWAY_DVD=1 + USE_GERMAN_MIDWAY_DVD=1 + USE_DVD=1 + else + [[ -d "${r}/CD1" ]] && USE_DVD=1 + [[ -d "${r}/CD7" ]] && USE_ECE_DVD=1 + fi + fi + done } games-ut2k4mod_pkg_nofetch() { - einfo "Please download ${A} and put it into ${DISTDIR}" + einfo "Please download ${SRC_URI} and put it into ${DISTDIR}" einfo "http://liflg.org/?catid=6&gameid=17" } games-ut2k4mod_src_unpack() { - [[ -z "${MOD_TBZ2}" ]] && die "what are we supposed to unpack ?" - [[ -z "${MOD_NAME}" ]] && die "what is the name of this ut2k4mod ?" + [[ -z "${MOD_TBZ2}" ]] && die "What are we supposed to unpack?" + [[ -z "${MOD_NAME}" ]] && die "What is the name of this ut2k4mod?" - for src_uri in ${A} - do - URI_SUFFIX="${src_uri##*.}" - case ${URI_SUFFIX##*.} in + local src_uri uri_suffix + for src_uri in ${A} ; do + uri_suffix="${src_uri##*.}" + case ${uri_suffix##*.} in run|bin) # We have a Makeself archive, use unpack_makeself - unpack_makeself ${src_uri} + unpack_makeself "${src_uri}" # Since this is a Makeself archive, it has a lot of useless # files (for us), so we delete them. rm -rf setup.data setup.sh uninstall ;; bz2|gz|Z|z|ZIP|zip) # We have a normal tarball/zip file, use unpack - unpack ${src_uri} + unpack "${src_uri}" ;; esac done - mkdir ${S}/unpack - for tarball in ${MOD_TBZ2} - do - if [[ -e "${tarball}_${PV}-english.tar.bz2" ]] - then - tar xjf ${tarball}_${PV}-english.tar.bz2 -C ${S}/unpack \ + mkdir "${S}"/unpack + local tarball + for tarball in ${MOD_TBZ2} ; do + if [[ -e "${tarball}_${PV}-english.tar.bz2" ]] ; then + tar xjf "${tarball}_${PV}-english.tar.bz2" -C "${S}"/unpack \ || die "uncompressing tarball" - elif [[ -e "${tarball}_${PV}.tar.bz2" ]] - then - tar xjf ${tarball}_${PV}.tar.bz2 -C ${S}/unpack \ - || die "uncompressing tarball" - else [[ -e "${tarball}.tar.bz2" ]] - tar xjf ${tarball}.tar.bz2 -C ${S}/unpack \ + elif [[ -e "${tarball}_${PV}.tar.bz2" ]] ; then + tar xjf "${tarball}_${PV}.tar.bz2" -C "${S}"/unpack \ || die "uncompressing tarball" + else + tar xjf "${tarball}.tar.bz2" -C "${S}"/unpack \ + || die "uncompressing tarball" fi done } games-ut2k4mod_src_install() { - dodir ${dir} - cp -r ${S}/unpack/* ${Ddir} + insinto "${dir}" + doins -r "${S}"/unpack/* || die "doins -r unpack failed" - for readme in README* - do - dodoc ${readme} || die "dodoc failed" + for readme in README* ; do + dodoc "${readme}" || die "dodoc failed" done - if [[ -n "${MOD_BINS}" ]] - then - exeinto ${dir} - doexe bin/${MOD_BINS} || die "doexe failed" - games_make_wrapper ${MOD_BINS} ./${MOD_BINS} ${dir} - make_desktop_entry ${MOD_BINS} "UT2004 - ${MOD_NAME}" ${MOD_ICON} + if [[ -n "${MOD_BINS}" ]] ; then + exeinto "${dir}" + doexe bin/"${MOD_BINS}" || die "doexe ${MOD_BINS} failed" + games_make_wrapper "${MOD_BINS}" ./"${MOD_BINS}" "${dir}" + make_desktop_entry "${MOD_BINS}" "UT2004 - ${MOD_NAME}" "${MOD_ICON}" fi - [ -e ${MOD_ICON} ] && doicon ${MOD_ICON} + if [[ -n "${MOD_ICON}" ]] && [[ -e "${MOD_ICON}" ]] ; then + doicon "${MOD_ICON}" || die "doicon ${MOD_ICON} failed" + fi prepgamesdirs } games-ut2k4mod_pkg_postinst() { - if [[ -n "${MOD_BINS}" ]] - then - einfo "To play this mod run:" - einfo " ${MOD_BINS}" + if [[ -n "${MOD_BINS}" ]] ; then + elog "To play this mod, run:" + elog " ${MOD_BINS}" fi games_pkg_postinst |