SUMMARY="A generic shell script compiler"
DESCRIPTION="Shc takes a script, which is specified on the command line and \
produces C source code. The generated source code is then compiled and linked \
to produce a stripped binary executable. \
The compiled binary will still be dependent on the shell specified in the \
first line of the shell code (i.e shebang) (i.e. #!/bin/sh), thus shc does not \
create completely independent binaries."
HOMEPAGE="https://github.com/neurobin/shc"
COPYRIGHT="1997-2013 Francisco Garcia
	2015-2017 Md Jahidul Hamid"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://github.com/neurobin/shc/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="da6a2a3ff4c356a61e086c616561bf681489993cab00c426bad0cfd703a68063"
SOURCE_FILENAME="shc-$portVersion.tar.gz"

ARCHITECTURES="all"

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

BUILD_REQUIRES="
	haiku_devel
	"
BUILD_PREREQUIRES="
	cmd:aclocal
	cmd:autoconf
	cmd:gcc
	cmd:libtoolize
	cmd:make
	"

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

INSTALL()
{
	make install
}

TEST()
{
	cd test
	$sourceDir/src/shc -v -f test.bash -o test
	echo | ./test Testing $portVersionedName on $targetArchitecture.
}
