SUMMARY="A slimy volleyball game"
DESCRIPTION="Slime volley is a volleyball simulation in which you control a \
slime (a semicircular blob) on which the ball bounces. Up to 6 players can \
play Slime Volley, locally or over the network. Lone fighters can also \
play against the computer."
HOMEPAGE="http://slime.tuxfamily.org/"
COPYRIGHT="2008-2014 VinDuv, McMic"
LICENSE="GNU GPL v3"
REVISION="5"
SOURCE_URI="http://slime.tuxfamily.org/down.php?id=1&os=src"
CHECKSUM_SHA256="be8f461c6f1188ba709b1fbcbe64edffca4b8eb358bd2ed8825f8ebf30e660d3"
SOURCE_FILENAME="slimevolley-$portVersion.tar.bz2"
SOURCE_DIR="slimevolley"
PATCHES="slimevolley-2.4.2.patchset"
ADDITIONAL_FILES="slimevolley.rdef"

ARCHITECTURES="all ?x86"

USER_SETTINGS_FILES="
	settings/Slime_Volley
	"

PROVIDES="
	slimevolley = $portVersion
	app:slimevolley
	"
REQUIRES="
	haiku
	lib:libintl
	lib:libSDL_1.2
	lib:libSDL_image_1.2
	lib:libSDL_net_1.2
	lib:libSDL_ttf_2.0
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libintl
	devel:libSDL
	devel:libSDL_image
	devel:libSDL_net
	devel:libSDL_ttf
	"
BUILD_PREREQUIRES="
	cmd:cmake
	cmd:gcc
	cmd:make
	"

BUILD()
{
	cmake . -DCMAKE_INSTALL_PREFIX=$prefix -DI10N_DIR=$dataDir/locale \
		-DDATA_DIR=$dataDir/games/slimevolley
	make $jobArgs

	addResourcesToBinaries $portDir/additional-files/slimevolley.rdef \
		slimevolley
}

INSTALL()
{
	make install

	mkdir -p $dataDir $appsDir
	mv $prefix/share/locale $dataDir
	rm -r $prefix/share
	mv $binDir/slimevolley $appsDir/"Slime Volley"

	addAppDeskbarSymlink $appsDir/"Slime Volley"
}
