SUMMARY="Extraction utility for zip archives"
DESCRIPTION="UnZip is an extraction utility for archives compressed in \
.zip format (zipfiles). UnZip can list or extract files from an archive \
or test its integrity."
HOMEPAGE="http://www.info-zip.org/UnZip.html"
COPYRIGHT="1995-2014 Greg Roelofs"
LICENSE="Info-ZIP"
REVISION="1"
SOURCE_URI="http://antinode.info/ftp/info-zip/unzip610c11.zip"
CHECKSUM_SHA256="13d92580d89e7c4199ba9a883957cc3676f0235dcac6f701f8f951b015c8d4c8"
SOURCE_DIR="unzip610c11"
PATCHES="unzip-$portVersion.patchset"

ARCHITECTURES="x86_gcc2"

PROVIDES="
	unzip = $portVersion
	cmd:funzip
	cmd:unzip
	cmd:unzipsfx
	cmd:zipgrep
	cmd:zipinfo
	"
REQUIRES="
	haiku
	lib:libiconv
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libiconv
	"
BUILD_PREREQUIRES="
	cmd:gcc
	cmd:make
	"

BUILD()
{
	make -f beos/Makefile \
		prefix=$prefix MANDIR=$manDir BINDIR=$binDir

}

INSTALL()
{
	mkdir -p $binDir
	mkdir -p $manDir/man1
	make -f beos/Makefile install \
		prefix=$prefix MANDIR=$manDir BINDIR=$binDir
}
