SUMMARY="Bible study tool that supports a wide variety of Bibles"
DESCRIPTION="ScriptureGuide is a Bible study tool. It supports all of the \
features you'd expect: search, setting the font, taking notes, etc. \
Through the accompanying ScriptureGuideManager app, you can download \
hundreds of free copies of various Bibles, commentaries, and related books."
HOMEPAGE="https://github.com/HaikuArchives/ScriptureGuide"
COPYRIGHT="2004 Jan Bungeroth
	2005-2021 ScriptureGuide Team"
LICENSE="GNU GPL v2
	MIT"
REVISION="1"
SOURCE_URI="https://github.com/Paradoxianer/ScriptureGuide/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="c928f03bdb0763d0c26b0cc934da47f24e8e0f8c33e0d9bec305cff7e4bd1d4e"
SOURCE_FILENAME="ScriptureGuide-v$portVersion.tar.gz"
SOURCE_DIR="ScriptureGuide-$portVersion"

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

PROVIDES="
	scriptureguide$secondaryArchSuffix = $portVersion
	app:ScriptureGuide = $portVersion
	app:ScriptureGuideManager = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	cmd:awk
	cmd:unzip
	cmd:wget
	lib:libsword_1.8.1$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libsword_1.8.1$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	makefile_engine
	cmd:gcc$secondaryArchSuffix
	cmd:ld$secondaryArchSuffix
	cmd:make
	"

BUILD()
{
	cd ScriptureGuide
	make $jobArgs
	cd ../ScriptureGuideManager
	make $jobArgs
}

INSTALL()
{
	mkdir -p $appsDir $docDir
	cp App/INSTALL.htm $docDir
	cp App/README.htm $docDir
	cp -R App/docs/*  $docDir/

	cp -R  App/ScriptureGuide* $appsDir
	addAppDeskbarSymlink $appsDir/ScriptureGuide
	addAppDeskbarSymlink $appsDir/ScriptureGuideManager
}
