# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games DESCRIPTION="Viking hack and slay game" HOMEPAGE="http://www.runegame.com" SRC_URI="rune-hov-0.2.tgz rhov108upd_linux.zip" LICENSE="LOKI-EULA" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" RDEPEND="virtual/opengl games-action/rune x86? ( || ( ( x11-libs/libX11 x11-libs/libXext ) virtual/x11 ) =media-libs/libsdl-1.2* ) amd64? ( app-emulation/emul-linux-x86-xlibs app-emulation/emul-linux-x86-compat app-emulation/emul-linux-x86-sdl )" DEPEND="" S=${WORKDIR} GAMES_CHECK_LICENSE="yes" dir=${GAMES_PREFIX_OPT}/rune Ddir=${D}/${dir} pkg_setup() { games_pkg_setup export CDROM_SET_NAMES=("Linux Rune Halls of Valhalla CD" "Windows Rune Halls of Valhalla CD") cdrom_get_cds data-HOV.tar.gz:Help/RuneLogoHOV.bmp } src_unpack() { dodir "${dir}" if [[ ${CDROM_SET} -eq 0 ]] then # unpack the data files tar xzf "${CDROM_ROOT}"/data-HOV.tar.gz || die "Could not unpack data-HOV.tar.gz" else # unpack the rune-hov-0.2.tgz unpack rune-hov-0.2.tgz || die "Could not unpack rune-hov-0.1.tgz" fi mkdir rhov108 cd rhov108 unpack rhov108upd_linux.zip } src_install() { insinto "${dir}" exeinto "${dir}" einfo "Copying files... this may take a while..." case ${CDROM_SET} in 0) for x in Maps Sounds System Textures do doins -r $x || die "copying $x" done # installing documentation/icon dodoc "${CDROM_ROOT}"/README-HOV || die "Could not dodoc README.linux" ;; 1) # copying Maps insinto ${dir}/Maps for x in DM-TEAM_MadKing.run DM-Gates.run AR-Widowmaker.run HB-Montezuma.run AR-AEternal.run HB-Agora.run DM-IceCavern.run DM-Sanctum.run AR-Cathedral.run DM-Skorir.run HB-DragonKeep.run AR-TimeToVent.run AR-Theatre.run AR-Champions.run HB-Montezuma2.run DM-Hel2000.run HB-Aqueduct.run DM-geothermal.run DM-Alfheim.run DM-Zorn.run DM-ChAoS.run DM-HelEvator.run DM-DwarfForge.run HB-HelRaiser.run DM-LostCrypt.run HB-Pits.run DM-Hudson.run AR-TeamVent.run AR-SmeltingPot.run DM-Ingles.run DM-seaside.run DM-Team_chasm.run DM-Team_ships.run DM-Havlamahl.run HB-DeCapital.run AR-BladePit.run DM-Bothvar.run do doins "${CDROM_ROOT}"/Maps/$x || die "copying $x" done # copying Sounds insinto ${dir}/Sounds doins "${CDROM_ROOT}"/Sounds/Addon.uax || die "copying Addon.uax" # copying System files insinto ${dir}/System for x in HeadBall.int HallsOfValhalla.int Arena.int HallsOfValhalla.u HeadBall.u do doins -r "${CDROM_ROOT}"/System/$x || die "copying $x" done # copying and modifying the files ##xdelta patch ${S}/System/Arena.u.patch ${CDROM_ROOT}/System/Arena.u ${S}/System/Arena.u || die "Could not create Arena.u" ##doins ${S}/System/Arena.u insinto ${dir}/Textures for x in JP.utx Galleon.utx ADFuthark.utx Drgnkeep.utx ADUruz.utx ADNorsk.utx DeCap1.utx ADVinjarg.utx do xdelta patch ${S}/Textures/$x.patch ${CDROM_ROOT}/Textures/$x ${S}/Textures/$x || die "modifying $x" doins ${S}/Textures/$x || die "copying $x" done ;; esac # copying 1.08 server patch files insinto ${dir}/System doins ${S}/rhov108/{*.u,*.int} || die "copying 1.08 System files" insinto ${dir}/Textures doins ${S}/rhov108/Textures/egyptsky.utx || die "copying 1.08 Texture files" insinto ${S}/Meshes doins ${S}/rhov108/players.ums || die "copying 1.08 Mesh files" insinto ${dir} doins -r ${S}/rhov108/Maps || die "copying 1.08 Maps" doins -r ${S}/rhov108/Web || die "copying 1.08 Web files" find ${Ddir} -exec touch '{}' \; prepgamesdirs }