SUMMARY="Archive manager similar to WinZip"
DESCRIPTION="Beezer is an archive manager that can extract and browse, create \
and add to archive files and also split and rejoin them. It extracts 7zip, \
bzip2, gzip, lha, rar, tar, xz and zip files and creates 7zip, bzip2, \
gzip, tar and zip archives."
HOMEPAGE="https://github.com/Teknomancer/beezer"
COPYRIGHT="2009 Ramshankar (aka Teknomancer)
	2011-2019 Chris Roberts"
LICENSE="BSD (3-clause)"
REVISION="4"
srcGitRev="7395927e1c67dbe2243aa4f669acce3b96c20632"
SOURCE_URI="https://github.com/Teknomancer/beezer/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="20cb7d8d0e03a56ab1fd34b04c2afd1daf4fbc11d9c099e66ff3562405d054c2"
SOURCE_DIR="beezer-$srcGitRev"
PATCHES="beezer-$portVersion.patchset"

ARCHITECTURES="all"

PROVIDES="
	beezer = $portVersion
	app:Beezer = $portVersion
	"
REQUIRES="
	haiku
	cmd:arj
	cmd:7za
	cmd:bzip2
	cmd:lha
	cmd:tar
	cmd:unrar
	cmd:unzip
	cmd:xz
	cmd:zip
	"

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	cmd:cmake
	cmd:gcc
	cmd:make
	"

BUILD()
{
	mkdir -p Source/build
	cd Source/build
	cmake ..
 	make $jobArgs
}

INSTALL()
{
	cd Source/build/build

	mkdir -p $appsDir/Beezer
	cp Beezer $appsDir/Beezer
	cp -a add-ons $appsDir/Beezer
	cp -a ../../Beezer/docs $appsDir/Beezer
	addAppDeskbarSymlink $appsDir/Beezer/Beezer

	mkdir -p $addOnsDir/Tracker
	cp -a TrackerAddOn/BeezerAddOn $addOnsDir/Tracker
}
