SUMMARY="Incremental journaling archiver with powerful compression"
DESCRIPTION="zpaq is a free and open source incremental, \
journaling command-line archiver. Among its features include \
up to four billion files and 250 terabytes of data before compression,\
encrypted archives via AES, multi-part/split archives,\
and powerful compression through multiple methods.\
\
zpaq is only intended for user-level backups. It should not be used to \
archive the operating system, as it does not follow links or save special \
files such as devices, sockets, or pipes."
HOMEPAGE="http://mattmahoney.net/dc/zpaq.html"
COPYRIGHT="2009-2016 Matt Mahoney"
LICENSE="Public Domain
	zpaq"
REVISION="1"
SOURCE_URI="http://mattmahoney.net/dc/zpaq715.zip"
CHECKSUM_SHA256="e85ec2529eb0ba22ceaeabd461e55357ef099b80f61c14f377b429ea3d49d418"
SOURCE_DIR=""

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

PROVIDES="
	zpaq$secondaryArchSuffix = $portVersion
	cmd:zpaq$secondaryArchSuffix = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	"
BUILD_PREREQUIRES="
	cmd:cmp
	cmd:g++$secondaryArchSuffix
	cmd:make
	cmd:pod2man
	cmd:unzip
	"

PATCH()
{
	sed -i "s/-pthread/-lpthread/g" Makefile
}

BUILD()
{
	make CXX=g++ $jobArgs
}

INSTALL()
{
	make BINDIR=$binDir MANDIR=$manDir install
}

TEST()
{
	make check
}
