SUMMARY="Game MMORPG/single player game. You can fight, farming, crafting, trading"
DESCRIPTION="This game is a independent MMORPG or a single player game."
HOMEPAGE="https://catchchallenger.first-world.info/"
COPYRIGHT="2011-2019 BRULE Herman Jacques Roger (alpha_one_x86)"
LICENSE="GNU GPL v3"
REVISION="1"
srcGitRev="d48ec0df05953f22b6ea76dfba818883468d2f7e"
SOURCE_URI="https://github.com/alphaonex86/CatchChallenger/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="ed7cef0d54879749ba218b0024723c00e0ed86f1ac577aed3934584b77dd0fce"
SOURCE_FILENAME="catchchallenger-$portVersion-$srcGitRev.tar.gz"
SOURCE_DIR="CatchChallenger-$srcGitRev"

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

PROVIDES="
	catchchallenger$secondaryArchSuffix = $portVersion
	app:CatchChallenger$secondaryArchSuffix
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libcrypto$secondaryArchSuffix
	lib:libGL$secondaryArchSuffix
	lib:libQt5Core$secondaryArchSuffix
	lib:libQt5Gui$secondaryArchSuffix
	lib:libQt5Network$secondaryArchSuffix
	lib:libQt5Widgets$secondaryArchSuffix
	lib:libQt5Xml$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	lib:libzstd$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libcrypto$secondaryArchSuffix
	devel:libGL$secondaryArchSuffix
	devel:libQt5Core$secondaryArchSuffix
	devel:libQt5Gui$secondaryArchSuffix
	devel:libQt5Network$secondaryArchSuffix
	devel:libQt5Widgets$secondaryArchSuffix
	devel:libQt5Xml$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	devel:libzstd$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:find
	cmd:gcc$secondaryArchSuffix
	cmd:lrelease$secondaryArchSuffix >= 5
	cmd:make
	cmd:qmake$secondaryArchSuffix >= 5
	"

BUILD()
{
	find ./ -name '*.ts' -exec lrelease {} \;
	cd client
	qmake *.pro
	make $jobArgs
}

INSTALL()
{
	mkdir -p $appsDir
	cp client/catchchallenger $appsDir/CatchChallenger
	addAppDeskbarSymlink $appsDir/CatchChallenger
}
