SUMMARY="A lightweight and flexible command-line JSON processor"
DESCRIPTION="jq is like sed for JSON data – you can use it to slice \
and filter and map and transform structured data with the same ease \
that sed, awk, grep and friends let you play with text. \
It is written in portable C, and it has zero runtime dependencies. \
You can download a single binary, scp it to a far away machine, \
and expect it to work. It can mangle the data format that you have into \
the one that you want with very little effort, and the program to do so \
is often shorter and simpler than you’d expect.
"
HOMEPAGE="http://stedolan.github.io/jq/"
SOURCE_URI="http://stedolan.github.io/jq/download/source/jq-1.4.tar.gz"
CHECKSUM_SHA256="998c41babeb57b4304e65b4eb73094279b3ab1e63801b6b4bddd487ce009b39d"
REVISION="1"
LICENSE="MIT"
COPYRIGHT="2012 Stephen Dolan"

ARCHITECTURES="x86"
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
        # x86_gcc2 is fine as primary target architecture as long as we're building
        # for a different secondary architecture.
        ARCHITECTURES="$ARCHITECTURES x86_gcc2"
fi
SECONDARY_ARCHITECTURES="x86"

PROVIDES="
	jq = $portVersion
	cmd:jq${secondaryArchSuffix} = $portVersion
	"

REQUIRES="
	haiku${secondaryArchSuffix}
	"

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

BUILD()
{
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	mkdir -p $binDir
	cp -a jq $binDir
}
