# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games DESCRIPTION="3D Models of Doom/Heretic/Hexen/Strife for Vavoom Engine" HOMEPAGE="http://vavoom-engine.com" SRC_URI="" LICENSE="as-is" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="doom heretic hexen strife" for X in ${IUSE} ; do if use ${X}; then case "${X}" in "doom") MY_PV="13";; "heretic") MY_PV="13";; "hexen") MY_PV="13-1";; "strife") MY_PV="13";; esac #SRC_URI="${SRC_URI} ${X}? ( mirror://sourceforge/vavoom/vmdl_${X}_${MY_PV}.zip )" SRC_URI="${SRC_URI} ${X}? ( mirror://sourceforge/vavoom/vmdl_${X}_${MY_PV}.zip )" fi done DEPEND="app-arch/unzip" pkg_setup() { if ( ! use doom && ! use heretic && ! use hexen && ! use strife); then eerror eerror "You must enable at least one USE flag between 'doom','heretic','hexen','strife'!" eerror die "No USE enabled" fi } src_unpack() { # unpack only desired models unpack ${A} || die "unpack failed" } src_install() { cd ${WORKDIR}/basev # Move documentation into proper location for X in ${IUSE} ; do if use ${X}; then docinto ${X} dodoc ${X}/models/*.txt || die "installing doc for ${X}-models failed" rm -f ${X}/models/*.txt fi done # Install models into vavoom base dir insinto "${GAMES_DATADIR}/vavoom/basev" doins -r * || die "installing data failed" prepgamesdirs } pkg_postinst() { games_pkg_postinst if ! has_version "games-fps/vavoom" ; then einfo "This is just 3D models data. To play, emerge a client" einfo "such as vavoom." echo fi }