SUMMARY="A 2D platform adventure game for TUX"
DESCRIPTION="Mole Invasion is a 2D platform adventure game for TUX, \
getting to kill the evil moles from the different scenarios."
HOMEPAGE="http://moleinvasion.tuxfamily.org/"
COPYRIGHT="2004-2008 Guinns(coding)
	2004-2008 Skeespin(gfx)
	2004-2008 Bohwaz(music)"
LICENSE="GNU GPL v2"
REVISION="2"
SOURCE_URI="ftp://download.tuxfamily.org/minvasion/packages/MoleInvasion-0.4.tar.bz2"
CHECKSUM_SHA256="a011361f07c06d79a5ba6d110d7b06b59da2c57970515d24fab063fe991d922c"
PATCHES="moleinvasion-0.4.patch"

ARCHITECTURES="all"

PROVIDES="
	moleinvasion = $portVersion
	app:MoleInvasion = $portVersion
	cmd:moleinvasion_editlevel = $portVersion
	cmd:moleinvasion_editworld = $portVersion
	"
REQUIRES="
	haiku
	lib:libGL
	lib:libSDL_1.2
	lib:libSDL_image_1.2
	lib:libSDL_mixer_1.2
	lib:libSDL_ttf_2.0
	lib:libsmpeg
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libSDL
	devel:libSDL_image
	devel:libSDL_mixer
	devel:libSDL_ttf
	devel:libsmpeg
	"
BUILD_PREREQUIRES="
	cmd:find
	cmd:gcc
	cmd:make
	"

BUILD()
{
	cd src
	make FINALEXEDIR=$binDir \
		FINALDATADIR=$dataDir/MoleInvasion
}

INSTALL()
{
	mkdir -p $appsDir $manDir/man6
	cp debian/*.6 $manDir/man6
	cd src
	make install FINALEXEDIR=$binDir
	make install-data FINALDATADIR=$dataDir/MoleInvasion
	mv $binDir/moleinvasion $appsDir/MoleInvasion
	addAppDeskbarSymlink $appsDir/MoleInvasion
}
