SUMMARY="A tool for converting DAA/GBI images to ISO format"
DESCRIPTION="DAA2ISO is an open source command-line/GUI tool for converting \
single and multipart DAA and GBI images to the original ISO format.
DAA/GBI files are 'Direct Access Archive' used by PowerISO and gBurner"
HOMEPAGE="http://aluigi.org/mytoolz.htm#daa2iso"
COPYRIGHT="2008-2009 Luigi Auriemma"
LICENSE="GNU GPL v2"
REVISION="4"
SOURCE_URI="http://aluigi.altervista.org/mytoolz/daa2iso.zip"
CHECKSUM_SHA256="f5990542bbfb632a18e664bb956d1dfa35b20945881c617af641a9ee8cfbc47b"
SOURCE_FILENAME="daa2iso-$portVersion.zip"
SOURCE_DIR=""
SOURCE_URI_2="http://httpredir.debian.org/debian/pool/main/d/daa2iso/daa2iso_0.1.7e-1.diff.gz#noarchive"
CHECKSUM_SHA256_2="810b1400c18f5dbcb35c64c56b23bd0a22b7623f2bc694f1b789f0418eaba1d1"

ARCHITECTURES="all"

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

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	cmd:gcc
	cmd:install
	cmd:make
	cmd:patch
	cmd:zcat
	"

BUILD()
{
	cd src
	make CFLAGS="-DNOLFS -O2 -s"
}

INSTALL()
{
	make -C src install PREFIX=$prefix
	install -d -m 755 $docDir $manDir/man1
	install -t $docDir -c -m 444 daa2iso.txt
	zcat $sourceDir2/daa2iso_0.1.7e-1.diff.gz | patch -p1
	install -t $manDir/man1 -c -m 444 debian/daa2iso.1
}
