SUMMARY="A program to extract Microsoft cabinet files"
DESCRIPTION="cabextract is Free Software for extracting Microsoft cabinet \
files, also called .CAB files. It is distributed under the GNU GPL license and \
is based on the portable LGPL libmspack library. cabextract supports all \
features and formats of Microsoft cabinet files and Windows CE installation \
files. It can also look inside other files for embedded cabinets."
HOMEPAGE="https://www.cabextract.org.uk/"
COPYRIGHT="2000-2018 Stuart Caie"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://www.cabextract.org.uk/cabextract-$portVersion.tar.gz"
CHECKSUM_SHA256="afc253673c8ef316b4d5c29cc4aa8445844bee14afffbe092ee9469405851ca7"

ARCHITECTURES="all ?arm ?ppc"

PROVIDES="
	cabextract = $portVersion
	cmd:cabextract = $portVersion
	"
REQUIRES="
	haiku
	"

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	cmd:awk
	cmd:gcc
	cmd:grep
	cmd:make
	cmd:sed
	"

TEST_REQUIRES="
	cmd:cmp
	cmd:lcab
	"

BUILD()
{
	runConfigure ./configure
	make
}

INSTALL()
{
	make install
}

TEST()
{
	make check
	lcab cabextract test.cab
	"$sourceDir"/cabextract -dtmp test.cab
	cmp cabextract tmp/cabextract
}
