# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=2 inherit eutils games MY_REV="-1" MY_ARCH="${ARCH/x86/i386}" DESCRIPTION="Global thermonuclear war simulation with multiplayer support" HOMEPAGE="http://www.introversion.co.uk/defcon/" SRC_URI="${PN}_${PV}${MY_REV}_${ARCH}.tar.gz" LICENSE="Introversion" SLOT="0" KEYWORDS="amd64 ~x86" IUSE="+system-libs" RESTRICT="mirror strip" RDEPEND="media-libs/libogg media-libs/libvorbis virtual/glu virtual/opengl x11-libs/libxcb x11-libs/libXext system-libs? ( media-libs/libsdl )" DEPEND="" S=${WORKDIR}/${PN} GAMEDIR=${GAMES_PREFIX_OPT}/${PN} pkg_nofetch() { echo elog "Please purchase and download '${SRC_URI}'" elog "then copy to: '${DISTDIR}'" echo } src_install() { insinto "${GAMEDIR}" exeinto "${GAMEDIR}" # Install game files doins *.dat || die "install dat" newexe ${PN}.bin.* ${PN}.bin || die "install bin" # Install bundled libraries if ! use system-libs; then if [ "${ARCH}" == "amd64" ]; then LIBDIR="lib64" else LIBDIR="${GAMEDIR}/lib" fi exeinto "${GAMEDIR}/${LIBDIR}" doexe "${LIBDIR}"/* || die "install bundled libs" fi # install documentation dodoc linux.txt || die "install doc" # install shortcuts doicon ${PN}.png || die "install icon" games_make_wrapper ${PN} ./${PN}.bin "${GAMEDIR}" "${GAMEDIR}" \ || die "install shortcuts" make_desktop_entry ${PN} "Defcon" prepgamesdirs } pkg_postinst() { einfo "To play the game, run:" einfo "${PN}" games_pkg_postinst }