# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils games Q="http://quake.errorabove.com/Nehahra" DESCRIPTION="Classic story-driven mission & movie pack for Quake 1" HOMEPAGE="http://nehahra.planetquake.gamespy.com/" SRC_URI="${Q}/nehquake.zip ${Q}/nehengup1.zip ${Q}/nehupdate3.zip ${Q}/Expansions/nehmusicfix.zip ${Q}/Expansions/elek_neh_episode4.zip ${Q}/movie/The_Seal_Of_Nehahra.zip" LICENSE="as-is" SLOT="0" KEYWORDS="~x86" IUSE="" # Needs the CD data RDEPEND="games-fps/quake1-data games-fps/darkplaces" DEPEND="app-arch/unzip" S=${WORKDIR} dir=${GAMES_DATADIR}/quake1 src_unpack() { # Unpack in correct order unpack ${A} cp -rf Quake/* QUAKE rm QUAKE/*.{DLL,exe} # The movie is installed, so remove the pak0 placeholder rm QUAKE/nehahra/pak0.zip # Fix filenames local d f fname lcfname for f in $(find . -type f) ; do fname=$(basename "${f}") lcfname=$(echo "${fname}" | tr [:upper:] [:lower:]) if [[ "${lcfname}" != "${fname}" ]] ; then # Rename the file to lower-case d=$(dirname "${f}") mv "${f}" "${d}/${lcfname}" fi done # Fix directory names mv QUAKE/nehahra/SOUND/WALL QUAKE/nehahra/SOUND/wall mv QUAKE/nehahra/SOUND QUAKE/nehahra/sound mv QUAKE/nehahra/*.html . find . -name '*.txt' -exec mv '{}' . \; rm 'important_readme!.txt' neh-readme.txt } src_install() { insinto "${dir}" doins -r QUAKE/* || die "doins -r failed" games_make_wrapper darkplaces-nehahra "darkplaces -nehahra" make_desktop_entry darkplaces-nehahra "Dark Places (Nehahra)" darkplaces.png dodoc *.txt dohtml *.html prepgamesdirs }