SUMMARY="2D platform shooter inspired by Duke Nukem 1"
DESCRIPTION="Dave Gnukem is a retro-style 2D scrolling platform shooter \
similar to, and inspired by, Duke Nukem 1.

The year is \$CURRENTYEAR+8.
An evil genius, Dr Proetton, has been hired by the CIA \
to infect the world's computers with a virus called SystemD, crippling them.
Only you can stop him. You must find the floppy disk with the \
Devuan Antivirus on it, and install it on the master computer, \
which is hidden in Vault7.
TL;DR: Shoot anything that moves!

Controls:
Left/right -> Move left/right
Ctrl -> Jump
Alt -> Shoot
Up -> Action key (open doors, use teleporters, etc.)
Escape -> Open the menu
"
HOMEPAGE="https://djoffe.com/gnukem/"
REVISION="1"
COPYRIGHT="1998-2019 David Joffe"
LICENSE="MIT
	   GNU GPL v3
	   CC-BY-3.0"
SOURCE_DIR="dave_gnukem-$portVersion"
SOURCE_URI="https://github.com/davidjoffe/dave_gnukem/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="b4180e94855fe1ad5eb29c4ec9c249f8e23fbd7a602f5c821dfe68c23325ad0d"
SOURCE_FILENAME="dave_gnukem-$portVersion.tar.gz"
SOURCE_URI_2="https://github.com/davidjoffe/gnukem_data/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256_2="d90c893acb98c9192847a1feeb74d159e7f3fda0fecfe6b70fb72b1a18ac593c"
SOURCE_FILENAME_2="gnukem_data-v$portVersion.tar.gz"
PATCHES="dave_gnukem-$portVersion.patchset"

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

PROVIDES="
	dave_gnukem$secondaryArchSuffix = $portVersion
	app:DaveGnukem
	"

REQUIRES="
	haiku$secondaryArchSuffix
	lib:libSDL_1.2$secondaryArchSuffix
	lib:libSDL_mixer_1.2$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libSDL_1.2$secondaryArchSuffix
	devel:libSDL_mixer_1.2$secondaryArchSuffix
	"

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

BUILD()
{
	make $jobArgs
}

INSTALL()
{
	#Doesn't have make install, so installation is done manually here.
	mkdir -p $appsDir/Dave_Gnukem
	cp davegnukem $appsDir/Dave_Gnukem
	cp -r $sourceDir2/gnukem_data-$portVersion $appsDir/Dave_Gnukem/data
	addAppDeskbarSymlink $appsDir/Dave_Gnukem/davegnukem "Dave Gnukem"
}
