SUMMARY="A puzzle game"
DESCRIPTION="
Rezerwar is a puzzle game that could be described as the illegitimate child of \
a known tetromino game and the average pipe game.
It runs on Linux,  Windows, Nintendo Wii (homebrew), FreeBSD, Amiga OS, And \
Now Haiku!
The whole game was created with open-source software including graphics, \
sounds and musics. Feel free to contribute. The goal of this game is \
basically to create networks of water to make them disappear, a couple tricks \
and techniques will help you achieve this goal faster.
"
HOMEPAGE="http://tamentis.com/projects/rezerwar/"
SRC_URI="http://tamentis.com/projects/rezerwar/files/rezerwar-0.4.2.tar.gz"
CHECKSUM_MD5="42018abe251e45ab8cc30133cde61ff8"
LICENSE="BSD (2-clause)"
COPYRIGHT="2008, 2009 Bertrand Janin"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86"

PROVIDES="
	rezerwar = $portVersion
	app:rezerwar = $portVersion
	"

REQUIRES="
	haiku$secondaryArchSuffix >= $haikuVersion
	lib:libsdl$secondaryArchSuffix
	lib:libsdl_mixer$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel >= $haikuVersion
	devel:libsdl$secondaryArchSuffix
	devel:libsdl_mixer$secondaryArchSuffix
	"

BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:make
	cmd:which
	cmd:sdl_config$secondaryArchSuffix
	"

PATCHES="rezerwar-0.4.2.patchset"

BUILD()
{
	./configure
	make
}

INSTALL()
{
	mkdir -p $appsDir/rezerwar
	cp -r data $appsDir/rezerwar
	#cp -r rezerwar $appsDir/rezerwar
	cp src/rezerwar $appsDir/rezerwar/rezerwar
	
	addAppDeskbarSymlink $appsDir/rezerwar/rezerwar "Rezerwar"
}
