SUMMARY="A puzzle game based on the original Lights Out!"
DESCRIPTION="LightsOff is a rendition of the addictive puzzle game 'Lights \
Out!' which was developed by Tiger Electronics for a handheld game console \
in the 1990s.

On a square grid some tiles are lit, some aren't. The objective is to turn \
all the lights off by clicking the fewest number of tiles. What makes it \
challenging: clicking a tile also toggles the tiles to left/right and \
above/below it."
APP="LightsOff"
instDir=$appsDir/$APP
HOMEPAGE="https://github.com/HaikuArchives/$APP"
COPYRIGHT="2005 DarkWyrm
	2018 Owen Pan"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="$HOMEPAGE/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="868f3d84562d51350338a708db7466d1ac40e883ccae237b3a383a411e8365e6"
SOURCE_DIR="$APP-$portVersion"

ARCHITECTURES="all"

PROVIDES="
	lightsoff = $portVersion
	app:$APP = $portVersion
	"
REQUIRES="
	haiku
	"

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:g++
	cmd:make
	"

defineDebugInfoPackage lightsoff \
	$instDir/$APP

BUILD()
{
	make -C src OBJ_DIR=objects $jobArgs
}

INSTALL()
{
	mkdir -p $instDir $instDir/docs $instDir/media
	cp src/objects/$APP $instDir
	cp -r docs $instDir
	cp -r media $instDir

	addAppDeskbarSymlink $instDir/$APP
}
