# Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=3 inherit eutils games MY_PN="${PN}-source" DESCRIPTION="A mix from Nintendo's Super Mario Bros and Valve's Portal." HOMEPAGE="http://stabyourself.net/${PN}/" SRC_URI="http://dajoh.dyndns.org/${P}/${MY_PN}.zip" RESTRICT="" LICENSE="CCPL-Attribution-ShareAlike-NonCommercial-3.0" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="" DEPEND="app-arch/unzip" RDEPEND=">=games-engines/love-0.8.0[gif,png]" S="${WORKDIR}" GAMEDIR="${GAMES_PREFIX_OPT}/${PN}" src_unpack() { unpack "${MY_PN}.zip" || die "unpack \"${MY_PN}.zip\" failed" # We need an icon: cd "${S}" || die "cd \"${S}\" failed" mv "${P/-/_}.love" "${PN}.zip" || die "mv \"${P/-/_}.love\" failed" unpack "./${PN}.zip" || die "unpack \"${PN}.zip\" failed" } src_install() { insinto "${GAMEDIR}" || die "insinto \"${GAMEDIR}\" failed" newins "${PN}.zip" "${PN}.love" || die "newins \"${PN}.love\" failed" # Make game wrapper: games_make_wrapper "${PN}" "love ${PN}.love" "${GAMEDIR}" || die "games_make_wrapper \"${PN}.love\" failed" # Install icon and desktop files: newicon "graphics/icon.gif" "${PN}.gif" || die "newicon \"icon.gif\" failed" make_desktop_entry "${PN}" "${PN^}" "/usr/share/pixmaps/${PN}.gif" || die "make_desktop_entry failed" # Setting permissions prepgamesdirs } pkg_postinst() { echo "" games_pkg_postinst einfo "${MY_PN} savegames and configurations are stored in:" einfo " \${HOME}/.local/share/love/${PN}/" echo "" }