SUMMARY="A clone of the popular Asteroids game targeting the SDL library"
DESCRIPTION="Vectoroids is an implementation of the popular Asteroids concept \
first conceived by Atari in the late 1970s. This version is based off the code \
of Agendaroids, adapted to use the cross-platform SDL library for audio and \
video, enabling it to run on numerous platforms. It uses smooth vector graphics \
and high-quality sound effects."
HOMEPAGE="http://www.newbreedsoftware.com/vectoroids/"
COPYRIGHT="2001-2002 Bill Kendrick"
LICENSE="GNU GPL v2"
REVISION="2"
SOURCE_URI="ftp://ftp.tuxpaint.org/unix/x/vectoroids/src/vectoroids-1.1.0.tar.gz"
CHECKSUM_SHA256="8d14dd281767e994108abd77c8e67d5a17718d0ad1e34d37e026911d14697b2e"

ARCHITECTURES="all ?x86"

PROVIDES="
	vectoroids = $portVersion
	cmd:vectoroids = $portVersion
	"
REQUIRES="
	haiku
	lib:libSDL_1.2
	lib:libSDL_image_1.2
	lib:libSDL_mixer_1.2
	"

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

# The Makefile for Vectoroids is hand-written and only works if you append a
# slash to DATA_PREFIX, but not the rest of the prefixes. MAN_PREFIX expects
# the parent directory of the actual man folder.
makeArgs="PREFIX=$prefix \
	MAN_PREFIX=${manDir}/.. \
	BIN_PREFIX=$binDir \
	DATA_PREFIX=${dataDir}/"

BUILD()
{
	make $makeArgs
}

INSTALL()
{
	mkdir -p $binDir
	make install $makeArgs
	addAppDeskbarSymlink $binDir/vectoroids Vectoroids
}
