SUMMARY="A help file viewer"
DESCRIPTION="An application for viewing help files that use a simple html like mark-up.\
Unlike html, .hlp is directed at help files not a rich web experiance."

HOMEPAGE="http://fatelk.com/"
COPYRIGHT="2017-2019 Jim Saxton, Fat Elk Software"
REVISION="1"
LICENSE="FatElk"
SOURCE_URI="http://fatelk.com/helpviewer/helpviewer-1.6.1.2.zip"
CHECKSUM_SHA256="c00e18a2f666ec9e1a354fde5151fba0e9dc32a063265399c1e1e39bc0943a39"

SOURCE_DIR="helpviewer"

ARCHITECTURES="all !x86"

PROVIDES="
	helpviewer = $portVersion
	app:HelpViewer = $portVersion
	cmd:helpviewer = $portVersion
	"
REQUIRES="
	haiku
	yab >= 1.7.5.5
	lib:libyab
	lib:libz
	"

BUILD_REQUIRES="
	haiku_devel
	"

BUILD_PREREQUIRES="
	cmd:unzip
	"

BUILD()
{
	unzip $targetArchitecture/HelpViewer.zip -d apps
	unzip $targetArchitecture/mime_db.zip -d data
}

INSTALL()
{
	mkdir -p $appsDir
	mkdir $appsDir/HelpViewer
	mkdir -p $dataDir
	mkdir -p $binDir
	cp -r apps/* $appsDir/HelpViewer/
	chmod a+x $appsDir/HelpViewer/HelpViewr-post-install.sh
	chmod a+x $appsDir/HelpViewer/add-remove_helpfile_template
	cp -r data/mime_db $dataDir/
	ln -s $appsDir/HelpViewer/HelpViewer $binDir
}
