# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 inherit eutils games DESCRIPTION="Quake Missoin Pack: Scourge of Armagon data files" HOMEPAGE="http://www.idsoftware.com/" SRC_URI="" LICENSE="QUAKE1EXP" SLOT="0" KEYWORDS="amd64 x86" IUSE="doc" DEPEND="" #need a client to use the data files. darkplaces is preferred because...its the best :-) RDEPEND="games-fps/quake1-data || ( games-fps/darkplaces games-fps/joequake games-fps/tenebrae games-fps/ezquake-bin games-fps/fuhquake-bin )" S=${WORKDIR} pkg_setup() { export CDROM_NAME_SET=("Existing Install" "The Offering CD" "Scourge of Armagon CD") cdrom_get_cds pak0.pak:Armagon/HIPNOTIC/PAK0.PAK:hipnotic/pak0.pak if [[ $CDROM_SET -ne 0 && $CDROM_SET -ne 1 && $CDROM_SET -ne 2 ]] ; then die "Error locating data files."; fi } src_unpack() { case ${CDROM_SET} in 0) cp ${CDROM_ROOT}/pak0.pak ${S}/pak0.pak || die "Error copying pak0.pak.";; 1) cp ${CDROM_ROOT}/Armagon/HIPNOTIC/PAK0.PAK ${S}/pak0.pak || die "Error copying pak0.pak.";; 2) cp ${CDROM_ROOT}/hipnotic/pak0.pak ${S}/pak0.pak || die "Error copying pak0.pak.";; esac } src_install() { dodir ${GAMES_DATADIR}/quake1/hipnotic insinto ${GAMES_DATADIR}/quake1/hipnotic doins ${S}/pak0.pak || die "Error installing pak0.pak."; if use doc ; then if [[ $CDROM_SET -eq 1 ]] ; then dodoc ${CDROM_ROOT}/License.txt || die "Error installing documentation file Licence.txt" dodoc ${CDROM_ROOT}/Armagon/README.TXT || die "Error installing documentation file README.TXT" fi if [[ $CDROM_SET -eq 0 ]] ; then dodoc ${CDROM_ROOT}/License.txt || \ dodoc ${CDROM_ROOT}/license.txt || \ die "Error installing documentation." dodoc ${CDROM_ROOT}/README.TXT || \ dodoc ${CDROM_ROOT}/readme.txt || \ die "Error installing documentation." fi if [[ $CDROM_SET -eq 2 ]] ; then #Not sure of file names, I don't have this CD! dodoc ${CDROM_ROOT}/*.txt * || die "Error installing documentation." fi fi prepgamesdirs }