SUMMARY="A library of common routines to be shared at the source level"
DESCRIPTION="Gnulib is a source code library that provides basic functionality \
to programs and libraries. Many software packages make use of Gnulib to avoid \
reinventing the portability wheel.
Gnulib is intended to be the canonical source for most of the important \
“portability” and/or common files for software projects.
These are files intended to be shared at the source level; Gnulib is not a \
typical library meant to be installed and linked against. Thus, unlike most \
projects, Gnulib does not normally generate a source tarball distribution; \
instead, developers grab modules directly from the source repository.
"
HOMEPAGE="http://www.gnu.org/software/gnulib" 
SOURCE_URI="git+git://git.savannah.gnu.org/gnulib.git"
REVISION="1"
ARCHITECTURES="x86_gcc2 x86 ?x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
LICENSE="GNULIB"
COPYRIGHT="1985-2013 Free Software Foundation."

PROVIDES="
	gnulib = $portVersion
	cmd:gnulib_tool$secondaryArchSuffix = $portVersion
	"
	
REQUIRES="
	haiku$secondaryArchSuffix
	"

BUILD_REQUIRES="" # No build, no requirements
	
BUILD_PREREQUIRES="" # No build, no requirements

BUILD()
{
	# Nothing to build
	exit 0
}

INSTALL()
{
	# Try to install gnulib-tool
	
	mkdir -p $dataDir/gnulib $binDir
	
	cp gnulib-tool $dataDir/gnulib/gnulib_tool # Fix binary name in help
	cp -R check-copyright check-module posix-modules build-aux config doc lib m4 modules tests top $dataDir/gnulib
	ln -s $dataDir/gnulib/gnulib_tool $binDir/gnulib_tool
}

TEST()
{
	make check
}
