SUMMARY="A port of the DOS shoot-em-up Tyrian"
DESCRIPTION="OpenTyrian is an arcade-style vertical scrolling shooter. The story is set in the \
year 20,031 where you play as Trent Hawkins, a skilled fighter-pilot employed to fight Microsol \
and save the galaxy. February 2007 the Pascal source code for Tyrian was licensed for a small \
group of developers to re-write it in C, in a project named OpenTyrian, licensed under the GNU \
General Public License. Following that announcement, in April 2007 Daniel Cook announced the \
free availability of his Tyrian artwork under generic liberal terms."
HOMEPAGE="https://bitbucket.org/opentyrian/opentyrian/"
COPYRIGHT="OpenTyrian Team"
LICENSE="GNU GPL v2"
REVISION="3"
SOURCE_URI="http://www.camanis.net/opentyrian/releases/opentyrian-$portVersion-src.tar.gz"
CHECKSUM_SHA256="f54b6b3cedcefa187c9f605d6164aae29ec46a731a6df30d351af4c008dee45f"
SOURCE_DIR="opentyrian-$portVersion"
PATCHES="opentyrian-$portVersion.patchset"

ARCHITECTURES="all !x86_gcc2 ?x86"
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	opentyrian$secondaryArchSuffix = $portVersion
	app:OpenTyrian
	"
REQUIRES="
	haiku$secondaryArchSuffix
	opentyrian_data
	lib:libSDL_1.2$secondaryArchSuffix
	lib:libSDL_net_1.2$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libSDL$secondaryArchSuffix
	devel:libSDL_net$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	make $jobArgs release
}

INSTALL()
{
	mkdir -p $appsDir/OpenTyrian $manDir/man6
	cp opentyrian* $appsDir/OpenTyrian/OpenTyrian
	cp linux/man/opentyrian.6 $manDir/man6
	addAppDeskbarSymlink $appsDir/OpenTyrian/OpenTyrian OpenTyrian
}
