# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit games eutils DESCRIPTION="Viking RTS written in Java" HOMEPAGE="http://www.oddlabs.com/tribaltrouble.php" LICENSE="Oddlabs software license" SRC_URI="http://download.oddlabs.com/TribalTroubleSetup.sh" KEYWORDS="~x86 ~amd64" SLOT="0" RESTRICT="nostrip nomirror" DEPEND="virtual/opengl virtual/jre sys-apps/sed" dir="${GAMES_PREFIX_OPT}/${PN}" Ddir="${D}/${dir}" src_unpack() { mkdir -p ${S} cp ${DISTDIR}"/TribalTroubleSetup.sh" ${S} cd ${S} sh ./TribalTroubleSetup.sh &> /dev/null || die "Unpacking game failed" cd tribaltrouble sed 's@JAVA=jre1.5.0_04/bin/java@JAVA=${JAVA_HOME}/bin/java@g' tribaltrouble > tribaltrouble.temp mv tribaltrouble.temp tribaltrouble chmod +x tribaltrouble } src_install() { cd ${S}/tribaltrouble insinto ${dir} doins loader.jar || die "doins failed" exeinto ${dir} doexe tribaltrouble || die "doexe failed" cp -R gamedata ${Ddir} || die "cp failed" insinto /usr/share/pixmaps/ doins icon.png #insinto /usr/share/applications/ #doins ${FILESDIR}/tribaltrouble.desktop echo -e "#!/bin/bash\ncd ${dir}\n./${PN}" > tribaltrouble exeinto /usr/games/bin doexe tribaltrouble || die "doexe failed" prepgamesdirs #make_desktop_entry tribaltrouble "Tribal Trouble" tribaltrouble.png } pkg_postinst() { games_pkg_postinst }