SUMMARY="Tool to convert Excel documents"
DESCRIPTION="Read data from Excel 97+ spread sheets without Microsoft Excel! \
Provides an API to write applications that read Excel documents. The xlreader \
tool converts data to tab delimited, CSV or SQL inserts. Written in C. Based on \
the Java version by Andrew Khan."
HOMEPAGE="http://giffin.org/xlreader"
COPYRIGHT="2001 David Giffin"
LICENSE="GNU GPL v2"
REVISION="2"
SOURCE_URI="https://downloads.sourceforge.net/xlreader/xlreader-$portVersion.tgz"
CHECKSUM_SHA256="53d556a77d67b3d6e8a4919a7753c019fc5395b8e2f5e33eb324dcf7c075d7fa"

ARCHITECTURES="all"

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

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	cmd:gcc
	cmd:make
	cmd:sed
	"

BUILD()
{
	make
}

INSTALL()
{
	install -d $binDir $docDir
	install -t $binDir xlreader
	install -t $docDir COPYRIGHT README
	sed -i -e '/^INSTALL NOTES$/,/^HELP$/ d;' $docDir/README
}
