SUMMARY="Metal Blob Solid is a 2D platform game"
DESCRIPTION="Since their world was invaded by an alien race, the Blobs have \
faced a lifetime of war. But now they have a chance to win the war once and \
for all. In Blob Wars: Metal Blob Solid, you take on the role of a fearless \
Blob agent, Bob. Bob's mission is to infiltrate the various enemy bases around \
the Blobs' homeworld and rescue as many MIAs as possible. But standing in his \
way are many vicious aliens, other Blobs who have been assimilated and the \
evil alien leader, Galdov."
HOMEPAGE="https://www.parallelrealities.co.uk/games/metalBlobSolid/"
COPYRIGHT="2004, 2005 Milan Babuskov"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="http://sourceforge.net/projects/blobwars/files/blobwars-$portVersion.tar.gz"
CHECKSUM_SHA256="c406279f6cdf2aed3c6edb8d8be16efeda0217494acd525f39ee2bd3e77e4a99"
PATCHES="blobwars-$portVersion.patchset"

ARCHITECTURES="?all"

PROVIDES="
	blobwars = $portVersion
	app:blobwars = $portVersion
	"
REQUIRES="
	haiku
	lib:libintl
	lib:libSDL2_2.0
	lib:libSDL2_image_2.0
	lib:libSDL2_mixer_2.0
	lib:libSDL2_net_2.0
	lib:libSDL2_ttf_2.0
	lib:libz
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libintl
	devel:libSDL2_2.0
	devel:libSDL2_image_2.0
	devel:libSDL2_mixer_2.0
	devel:libSDL2_net_2.0
	devel:libSDL2_ttf_2.0
	devel:libz
	"
BUILD_PREREQUIRES="
	cmd:gcc
	cmd:make
	cmd:pkg_config
	"

BUILD()
{
	make $jobArgs
}

INSTALL()
{
	mkdir -p $appsDir/BlobWars/{data,doc,icons,sound,gfx,locale}

	cp blobwars $appsDir/BlobWars/
	cp -r data/* $appsDir/BlobWars/data/
	cp -r doc $appsDir/BlobWars/
	cp -r icons $appsDir/BlobWars/
	cp -r sound $appsDir/BlobWars/
	cp -r gfx $appsDir/BlobWars/
	cp -r locale $appsDir/BlobWars/

	addAppDeskbarSymlink $appsDir/BlobWars/blobwars BlobWars
}
