# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/games-strategy/darwinia-demo/darwinia-demo-1.3.0.ebuild,v 1.9 2009/05/22 21:47:48 mr_bones_ Exp $

EAPI="2"

inherit eutils games
MY_ARCH=

DESCRIPTION="a breakout-style action game with a sprinkle of a Japanese-style RPG"
HOMEPAGE="http://www.wizorb.com/"

SRC_URI="amd64? ( wizorb-64bit.tar.gz )"
#	x86? ( wizorb-32bit.tar.gz )

LICENSE="as-is"
SLOT="0"
KEYWORDS="-* amd64 ~x86"
IUSE=""
RESTRICT="strip fetch"

RDEPEND=">=dev-lang/mono-2.10.3
	dev-dotnet/libgdiplus"

S=${WORKDIR}/${PN}

GAMEDIR=${GAMES_PREFIX_OPT}/${PN}

src_install() {
	insinto "${GAMEDIR}"
	exeinto "${GAMEDIR}"

	# install icon
	doicon ${PN}.png && rm ${PN}.png || die "install icon"

	# install game files
	doins -r * || die "install data"

	# install binary
	doexe ${PN^} || die "install binary"

	# install shortcuts
	games_make_wrapper "${PN}" "./${PN^}" "${GAMEDIR}" "${GAMEDIR}" \
		|| die "install shortcue"
	make_desktop_entry "${PN}" "${PN^}"

	prepgamesdirs
}

pkg_postinst() {
	einfo "To play the game, run:"
	einfo "${PN}"
	games_pkg_postinst
}