# Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils flag-o-matic games DESCRIPTION="Third-person sneaker like Splinter Cell" HOMEPAGE="http://www.coldwar-game.com/" SRC_URI="coldwar_demo.run" DOWNLOAD_URL="http://www.mindwarestudios.com/download/coldwar_demo.torrent" # Not sure where the license is! LICENSE="coldwar-demo" SLOT="0" # Has an "x86_64" dir, so maybe works on other arches (untested). KEYWORDS="~x86" IUSE="" RESTRICT="fetch" DEPEND="app-arch/tar app-arch/gzip" RDEPEND="virtual/x11 virtual/opengl" S=${WORKDIR} pkg_nofetch() { einfo "Please download ${A} into ${DISTDIR}" einfo "using ${DOWNLOAD_URL}" } S=${WORKDIR} dir=${GAMES_PREFIX_OPT}/${PN} Ddir=${D}/${dir} src_unpack() { cp ${DISTDIR}/${A} ${WORKDIR} || die "cp failed" cd ${WORKDIR} sh ${A} --noexec --keep --target . || die "unpack failed" } src_install() { if use x86; then mv bin/Linux/x86/glibc-2.1/bin/* bin/ elif use amd64; then mv bin/Linux/x86_64/glibc-2.1/bin/* bin/ else die "Cannot copy executables!" fi games_make_wrapper ${PN} ./bin/launcher "${dir}" "${dir}" newicon coldwar.xpm ${PN}.xpm || die "copying icon" make_desktop_entry "${PN}" "Cold War Demo" "${PN}".xpm rm -rf coldwar_demo.run setup.* bin/Linux lib/libopenal* mkdir -p ${Ddir} cp -r * ${Ddir}/ || die "recursive copy failed" prepgamesdirs } pkg_postinst() { games_pkg_postinst einfo "To play the game, run: ${PN}" }