SUMMARY="Iso9660 Analyzer Tool"
DESCRIPTION="Detects and converts DVD/CD images from BIN/MDF/PDI/CDI/NRG/B5I \
to ISO-9660."
HOMEPAGE="https://sourceforge.net/projects/iat.berlios/"
COPYRIGHT="2007, 2008, 2009 Salvatore Santagati"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="https://downloads.sourceforge.net/iat.berlios/iat-$portVersion.tar.bz2"
CHECKSUM_SHA256="fb72c42f4be18107ec1bff8448bd6fac2a3926a574d4950a4d5120f0012d62ca"

ARCHITECTURES="all ?x86_gcc2"
if [ "$targetArchitecture" = x86_gcc2 ]; then
SECONDARY_ARCHITECTURES="x86"
fi

# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
	commandBinDir=$prefix/bin
fi

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

BUILD_REQUIRES="
	haiku${secondaryArchSuffix}_devel
	"
BUILD_PREREQUIRES="
	cmd:awk
	cmd:gcc$secondaryArchSuffix
	cmd:make
	"

defineDebugInfoPackage iat$secondaryArchSuffix \
	"$commandBinDir"/iat

BUILD()
{
	runConfigure --omit-dirs "binDir sbinDir" ./configure \
		--bindir=$commandBinDir \
		--sbindir=$commandBinDir

	make $jobArgs
}

INSTALL()
{
	make install
}

TEST()
{
	make check
}
