DESCRIPTION="
Hugen is a simply python script for generating code for Haiku \
applications. It is based on templates. You can define your own \
one and quick generate some files with adequate names and content \
instead creating it manually. Templates for class and simple \
application with Makefile and Jamfile are provided by default. 
"
SUMMARY="Code generator for Haiku"
HOMEPAGE="https://github.com/aldeck/hugen"
COPYRIGHT="2009 Alexandre Deckner"
LICENSE="MIT"
SOURCE_URI="git+https://github.com/aldeck/hugen.git#a5e42390e6d4435d9d81fe3670670e18a52dee9c"
REVISION="1"
ARCHITECTURES="x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 ?x86"

PROVIDES="
	hugen$secondaryArchSuffix = $portVersion
	cmd:hugen$secondaryArchSuffix = $portVersion
	"

REQUIRES="
	cmd:python$secondaryArchSuffix
	"
BUILD_REQUIRES="
	cmd:python
	"
BUILD_PREREQUIRES="
	cmd:python
	"

BUILD()
{
	# simply do nothing
	echo
}

INSTALL()
{
	mkdir -p $binDir
	python=$portPackageLinksDir/cmd~python/bin/python
	version=$($python --version 2>&1 | sed 's/Python //' | head -c3)
	
	installLocation=$prefix/lib/python$version/vendor-packages
	mkdir -p $installLocation/hugen_app
	cp -R hugen.py configs/ templates/ $installLocation/hugen_app
	echo python $installLocation/hugen_app/hugen.py > $binDir/hugen
	chmod +x $binDir/hugen
}
