SUMMARY="Powerfully simple build configuration"
DESCRIPTION="Describe your software project with a full-featured scripting \
language and let Premake write the build scripts for you. With one file your \
project can support both IDE-addicted Windows coders and Linux command-line junkies!"
HOMEPAGE="http://industriousone.com/premake"
COPYRIGHT="2012 Industrious One, LLC"
LICENSE="BSD (2-clause)"
REVISION="1"
SOURCE_URI="https://github.com/premake/premake-core/releases/download/v${portVersion%%~alpha*}-${portVersion##*.*.*~}/premake-${portVersion%%~alpha*}-${portVersion##*.*.*~}-src.zip"
CHECKSUM_SHA256="880f56e7cb9f4945d1cb879f059189462c1b7bf62ef43ac7d25842dfb177dd53"
SOURCE_DIR="premake-${portVersion%%~alpha*}-${portVersion##*.*.*~}"

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

commandBinDir=$binDir
if [ "$targetArchitecture" = x86_gcc2 ]; then
	commandBinDir=$prefix/bin
fi

PROVIDES="
	premake$secondaryArchSuffix = $portVersion
	cmd:premake5 = $portVersion
	"
REQUIRES="
	haiku$secondaryArchSuffix
	"

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

BUILD()
{
	make -f Bootstrap.mak haiku
}

INSTALL()
{
	cd bin/release
	mkdir -p $commandBinDir
	install -m 0755 premake5 $commandBinDir
}
