# Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ EAPI=3 inherit eutils games MY_PN="${PN//-/_}" MY_ARCH="${ARCH/amd64/x86_64}" DESCRIPTION="Monster RPG 2 is a console style role playing game (JRPG) with a lot of depth and old-school character." HOMEPAGE="http://www.monster-rpg.com/" SRC_URI="monster-rpg-two_${PV}_${ARCH}.zip" RESTRICT="fetch strip" LICENSE="as-is" SLOT="0" KEYWORDS="amd64" IUSE="" DEPEND="app-arch/xz-utils" RDEPEND="virtual/opengl x11-libs/libX11 x11-libs/libXau x11-libs/libxcb x11-libs/libXdmcp x11-libs/libXext x11-libs/libXfixes x11-libs/libXinerama" S="${WORKDIR}/MonsterRPG2-${PV}-${ARCH}" GAMEDIR="${GAMES_PREFIX_OPT}/${PN}" BIN="monster2" PACKAGE="MonsterRPG2-${PV}-${MY_ARCH}" pkg_nofetch() { einfo "" einfo "Please buy and download \"${SRC_URI}\"" einfo "and move/link it to \"${DISTDIR}\"" einfo "" } src_unpack() { unpack "${A}" unpack "./${PACKAGE}.tar.bz2" || die "unpack tarball failed" rm "./${PACKAGE}.tar.bz2" } src_prepare() { mv "${PACKAGE}/morpg2-icon.png" "${PACKAGE}/${BIN}.png" } src_install() { # Install data cd "${PACKAGE}" exeinto "${GAMEDIR}" insinto "${GAMEDIR}" doexe ${BIN} || die "install binary failed" doins -r data *.so || die "install data failed" # Install shortcut doicon "${BIN}.png" || die "install icon failed" games_make_wrapper "${BIN}" "./${BIN}" "${GAMEDIR}" || die "install wrapper failed" make_desktop_entry "${BIN}" "Monster RPG 2" "${BIN}" || die "install shortcut failed" prepgamesdirs } pkg_postinst() { echo einfo "To play Monster RPG 2, run:" einfo "${BIN}" echo }