SUMMARY="A screen recorder utility"
DESCRIPTION="
BeScreenCapture is a screen recorder utility for Haiku.
It allows you to record what happens on your screen, then save it \
to any media format supported in Haiku.
BeScreenCapture can record either the entire screen, or just a section you \
select.
"

SUMMARY_inputfilter="Shortcut handler for BeScreenCapture"
DESCRIPTION_inputfilter="
Input Server Addon for BeScreenCapture. Allows the user to launch BeScreenCapture \
and start/stop recording using a keyboard combination (CTRL-COMMAND-SHIFT + R).
"

HOMEPAGE="https://github.com/jackburton79/bescreencapture"
SOURCE_URI="https://github.com/jackburton79/bescreencapture/archive/v2.0.tar.gz"
CHECKSUM_SHA256="2725e7fad341fd9ea8d6510452ee9561e8fa1b3905c9894f2c3b5b6288d8790a"
SOURCE_FILENAME="bescreencapture-2.0.tar.gz"
LICENSE="
	BSD (3-clause)
	MIT
	"
COPYRIGHT="2014-2015 Stefano Ceccherini"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 x86_64"

PROVIDES="
	bescreencapture = $portVersion
	app:BeScreenCapture = $portVersion
	"

PROVIDES_inputfilter="
	bescreencapture_inputfilter = $portVersion
	app:BeScreenCaptureInputFilter = $portVersion
	"

REQUIRES="
	haiku
	"
REQUIRES_inputfilter="
	haiku
	bescreencapture == $portVersion
	"

BUILD_REQUIRES="
	haiku_devel
	"

BUILD_REQUIRES="
	haiku_devel
	"

BUILD_PREREQUIRES="
	makefile_engine
	cmd:make
	cmd:gcc
	"

BUILD()
{
	make OBJ_DIR=objects \
		BUILDHOME=`finddir B_SYSTEM_DEVELOP_DIRECTORY`
	
	make -C inputfilter OBJ_DIR=objects \
		BUILDHOME=`finddir B_SYSTEM_DEVELOP_DIRECTORY`
}

INSTALL()
{
	mkdir -p $appsDir
	cp -a objects/BeScreenCapture $appsDir
	mkdir -p $addOnsDir/input_server/filters
	cp -a inputfilter/objects/BeScreenCaptureInputFilter $addOnsDir/input_server/filters

	packageEntries inputfilter \
	add-ons/input_server/filters/BeScreenCaptureInputFilter

	addAppDeskbarSymlink $appsDir/BeScreenCapture
}
