# Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=3 inherit eutils games MY_PN="FrozenSynapse" DESCRIPTION="Frozen Synapse is a thrilling strategy game" HOMEPAGE="http://www.frozensynapse.com/" SRC_URI="${PN}-linux-32-1339710386.run" RESTRICT="fetch" LICENSE="" SLOT="0" KEYWORDS="amd64 x86" IUSE="" DEPEND="app-arch/unzip" RDEPEND="amd64? ( app-emulation/emul-linux-x86-sdl ) x86? ( media-libs/libsdl[audio,joystick,video] )" S="${WORKDIR}" GAMEDIR="${GAMES_PREFIX_OPT}/${PN}" pkg_nofetch() { echo einfo "Please buy and download '${SRC_URI}'" einfo "and move/link it to '${DISTDIR}'" echo } src_unpack() { # There doesn't seem to be a way to unpack the files without installing cp "${DISTDIR}"/${SRC_URI} . chmod a+x ${SRC_URI} ./${SRC_URI} --mode unattended --prefix . || die "unpack failed" } src_install() { insinto "${GAMEDIR}" exeinto "${GAMEDIR}" # Install executable doexe "${MY_PN}" || die "install binary failed" # Install data doins -r TGB common psychoff tools || die "install data dirs failed" doins font{chars,list}.txt main.cs \ || die install "install data files failed" # Install documentation dodoc readme.txt || die install "install doc failed" # Install shortcut newicon fs_icon.png ${PN}.png || die "install icon failed" games_make_wrapper "${PN}" "./${MY_PN}" "${GAMEDIR}" \ || die "install wrapper failed" make_desktop_entry "${PN}" "Frozen Synapse" \ || die "instal lshortcut failed" # Setting permissions prepgamesdirs } pkg_postinst() { echo "" games_pkg_postinst einfo "Please report any bugs here:" einfo " http://bugzilla.icculus.org/" echo einfo "${MY_PN} savegames and configurations are stored in:" einfo " \${HOME}/.local/share/${MY_PN}" echo }