SUMMARY="A freecell clone"
DESCRIPTION="SuperFreeCell is the native clone of FreeCell, a solitaire-based \
card game played with a 52-card standard deck."
HOMEPAGE="https://github.com/aarroyoc/SuperFreeCell"
COPYRIGHT="2014-2015 Adrián Arroyo Calle"
LICENSE="MIT"
REVISION="5"
srcGitRev="c2dc0320cfc3b461acae346ebf90e5b6501feb98"
SOURCE_URI="$HOMEPAGE/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="af3668423e0f6fe19ac1efbcd6696046c1a492b616390222b140524ca9161a94"
SOURCE_DIR="SuperFreeCell-$srcGitRev"
ADDITIONAL_FILES="superfreecell.rdef.in"

ARCHITECTURES="all"

PROVIDES="
	superfreecell = $portVersion
	app:superfreecell = $portVersion
	"
REQUIRES="
	haiku
	"

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	cmd:cmake
	cmd:g++
	cmd:ld
	cmd:make
	"

BUILD()
{
	cmake .
	make
}

INSTALL()
{
	cat $portDir/additional-files/superfreecell.rdef.in >> $sourceDir/src/SuperFreeCell.rdef

	mkdir -p $appsDir
	cp SuperFreeCell $appsDir/SuperFreeCell

	addResourcesToBinaries src/SuperFreeCell.rdef $appsDir/SuperFreeCell
	mimeset -f $appsDir/SuperFreeCell

	addAppDeskbarSymlink $appsDir/SuperFreeCell
}
