SUMMARY="Identify a file's format by scanning binary data for patterns"
DESCRIPTION="
This is Release 5.x of Ian Darwin's (copyright but distributable) file(1) \
command, an implementation of the Unix File(1) command. It knows the 'magic \
number' of several thousands of file types. This version is the standard \
'file' command for Linux, *BSD, and other systems. (See 'patchlevel.h' for the \
exact release number).
"
HOMEPAGE="ftp://ftp.astron.com/pub/file/"
SOURCE_URI="ftp://ftp.astron.com/pub/file/file-5.15.tar.gz"
CHECKSUM_SHA256="4bd52cc614d6488127c0bddc208a2855481744d76ff0878d9c173d2a6ed564e4"
REVISION="1"
LICENSE="BSD (2-clause)"
COPYRIGHT="
1986-1999 Ian F. Darwin
1994-2013 Christos Zoulas
"
ARCHITECTURES="x86 x86_gcc2 x86_64"

PROVIDES="
	file = $portVersion compat >= 5
	cmd:file = $portVersion compat >= 5
	lib:libmagic = 1.0.0 compat >= 0
	"

REQUIRES="
	haiku
	lib:libz
	"

BUILD_REQUIRES="
	devel:libz
	"

BUILD_PREREQUIRES="
	haiku_devel
	cmd:autoreconf
	cmd:aclocal
	cmd:libtoolize
	cmd:make
	cmd:gcc
	"

PROVIDES_devel="
	file_devel = $portVersion compat >= 0
	devel:libmagic = $portVersion compat >= 0
	"

REQUIRES_devel="
	file == $portVersion
	"

PATCHES="file-5.15.patch"


BUILD()
{
	autoreconf -fvi
	runConfigure ./configure
	make
}

INSTALL()
{
	make install
	prepareInstalledDevelLibs libmagic
	packageEntries devel $developDir
}
