SUMMARY="A tool for distributed software configuration management"
DESCRIPTION="Fossil is a simple, high-reliability, distributed version \
control system like Git and Mercurial, but Fossil also supports distributed \
bug tracking, distributed wiki, distributed forums, and a distributed blog \
mechanism all in a single integrated package.

Additionally, Fossil also has a built-in and easy-to-use web interface that \
simplifies project tracking and promotes situational awareness."
HOMEPAGE="https://www.fossil-scm.org/"
COPYRIGHT="2007-2022 D. Richard Hipp"
LICENSE="BSD (2-clause)"
REVISION="1"
tag="84f25d7eb10c0714109d69bb2809abfa8b4b5c3d73b151a5b10df724dacd46d8"
SOURCE_URI="https://fossil-scm.org/home/tarball/$tag/fossil-src-$portVersion.tar.gz"
CHECKSUM_SHA256="300c1d5cdd6224ec6e8c88ab3f38d50f80e4071b503731b75bd61274cf310733"
SOURCE_DIR="fossil-src-$portVersion"

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

PROVIDES="
	fossil$secondaryArchSuffix = $portVersion
	cmd:fossil = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libssl$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	"

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	devel:libssl$secondaryArchSuffix
	devel:libz$secondaryArchSuffix
	"
BUILD_PREREQUIRES="
	cmd:gcc$secondaryArchSuffix
	cmd:make
	"

TEST_REQUIRES="
	cmd:tclsh
	"

BUILD()
{
	# not an autotools configure
	./configure --prefix=$prefix
	make $jobArgs
}

INSTALL()
{
	make install
	install -d $manDir/man1
	install -t $manDir/man1 -m 444 fossil.1
}

TEST()
{
	make test
}
