SUMMARY="Optimizes APNG animations"
DESCRIPTION="apngopt is a small utility which optimizes existing APNG animation files."
HOMEPAGE="https://sourceforge.net/projects/apng/"
COPYRIGHT="2011-2015 Max Stepin"
LICENSE="Zlib"
REVISION="1"
SOURCE_URI="https://sourceforge.net/projects/apng/files/APNG_Optimizer/$portVersion/apngopt-$portVersion-src.zip"
CHECKSUM_SHA256="c96047a893645fbd4afa5631b5d1728db3e6874ba8d76637de34355294a38bcf"
SOURCE_DIR=""

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

PROVIDES="
	apngopt$secondaryArchSuffix = $portVersion
	cmd:apngopt = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	lib:libpng16$secondaryArchSuffix
	lib:libz$secondaryArchSuffix
	"

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

defineDebugInfoPackage apngopt$secondaryArchSuffix \
	$prefix/bin/apngopt

BUILD()
{
	make $jobArgs
}

INSTALL()
{
	install -d -m 755 $prefix/bin $docDir
	install -t $prefix/bin -m 555 apngopt
	install -t $docDir -m 444 readme.txt
}
