# Copyright 1999-2005 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.humanheadstudios.com" #SRC_URI="ftp://ftp.headoff.com/GamePatches/Rune/Rune107All.zip # http://ftp.headoff.com/GamePatches/Rune/Rune107All.zip # ftp://ftp.volftp.mondadori.com/pub/pc/windows/win98/games/patches/rune107all.zip" SRC_URI="runelinuxfiles.tar.gz" LICENSE="as-is" SLOT="0" KEYWORDS="-* x86" IUSE="nls" RDEPEND="virtual/x11 =media-libs/libsdl-1.2* opengl? ( virtual/opengl )" DEPEND="${RDEPEND}" S=${WORKDIR} src_install() { local dir=${GAMES_PREFIX_OPT}/rune local Ddir=${D}/${dir} dodir ${dir} CDROM_NAME="Rune - Windows CD" cdrom_get_cds System/Rune.exe # copy the data files cp -rf "${CDROM_ROOT}"/{Maps,Sounds,Web} ${Ddir}/ || die "Could not copy Maps, Sounds, Textures and Web" # make linux texturefiles from windows texturefiles dodir ${dir}/Textures for x in `find "${CDROM_ROOT}"/Textures/ -type f -printf '%f '` ; do echo -ne '\271\325\036\214' |cat - ${CDROM_ROOT}/Textures/$x |sed -e '1 s/\(....\)..../\1/' >${Ddir}/Textures/$x || die "Could not modify and copy Textures" done # System folder dodir ${dir}/System || die "Could not create System folder" # copy language and .u files use nls && cp "${CDROM_ROOT}"/System/*.{est,frt,itt} ${Ddir}/System/ || eerror "Could not copy language specific data" cp "${CDROM_ROOT}"/System/*.{int,u} ${Ddir}/System/ || die "Could not copy System data" # modify the files mv ${Ddir}/System/OpenGlDrv.int ${Ddir}/System/OpenGLDrv.int || die "Could not modify System file OpenGlDrv.int" mv ${Ddir}/Textures/bloodFX.utx ${Ddir}/Textures/BloodFX.utx || die "Could not modify Texture file bloodFX.utx" mv ${Ddir}/Textures/RUNESTONES.UTX ${Ddir}/Textures/RUNESTONES.utx || die "Could not modify Texture file RUNESTONES.UTX" mv ${Ddir}/Textures/tedd.utx ${Ddir}/Textures/Tedd.utxx || die "Could not modify Texture file tedd.utx" mv ${Ddir}/Textures/UNDERANCIENT.utx ${Ddir}/Textures/UnderAncient.utxx || die "Could not modify Texture file UNDERANCIENT.utx" rm ${Ddir}/System/{Setup.int,SGLDrv.int,MeTaLDrv.int,Manifest.int,D3DDrv.int,Galaxy.int,SoftDrv.int,WinDrv.int,Window.int} || die "Could not delete not needed System files" # patch the windows files cp -rf ${S}/patch/* ${Ddir}/ || die "Could not copy Patch data" # copy linux specific files cp -rf ${S}/System/* ${Ddir}/System/ || die "Could not copy Linux specific files" cp -rf ${S}/Help ${Ddir}/Help || die "Could not copy Help data" # the most important thing: rune :) exeinto ${dir} doexe bin/x86/rune || die "Could not install rune executable" # export some symlinks so ppl can run dodir ${GAMES_BINDIR} dosym ${dir}/rune ${GAMES_BINDIR}/rune || die "Could not symlink rune" # installing documentation/icon dodoc README || die "Could not dodoc README.linux" insinto /usr/share/pixmaps; doins icon.xpm || die "Could not copy pixmap" insinto ${dir} doins README icon.{xpm,bmp} || die "Could not copy readme and icon" find ${Ddir} -exec touch '{}' \; prepgamesdirs }