SUMMARY="Library for solving packages and reading repositories"
DESCRIPTION="Library for solving packages and reading repositories."
LICENSE="BSD (3-clause)"
COPYRIGHT="2007-2013, Novell Inc."
HOMEPAGE="http://github.com/openSUSE/libsolv" 
SRC_URI="git+git://github.com/weinhold/libsolv.git#85dcb683b0c705c1789a3f688bd0d02368107824"
REVISION="2"
ARCHITECTURES="x86_gcc2 ?x86"

PROVIDES="libsolv = $portVersion
	lib:libsolv = $portVersion
	lib:libsolvext = $portVersion"
REQUIRES="haiku >= $haikuVersion
	lib:libexpat >= 1.5
	lib:libz
	"
BUILD_REQUIRES="$REQUIRES"
BUILD_PREREQUIRES="haiku_devel >= $haikuVersion
	cmd:cmake
	cmd:gcc
	cmd:ld
	cmd:make
	cmd:sed
	"


BUILD()
{
	rm -rf build
	mkdir build
	cd build
	cmake -DCMAKE_INSTALL_PREFIX:PATH=$prefix ..
	make $jobArgs
}

INSTALL()
{
	cd build
	make install

	# set up the develop directory correctly
	prepareInstalledDevelLibs libsolv libsolvext

	mkdir -p $includeDir
	mv $prefix/include/* $includeDir
	rmdir $prefix/include

	# move cmake files
	mkdir -p $dataDir
	mv $prefix/share/cmake $dataDir
	rmdir $prefix/share

	# We don't want the executables.
	rm -r $prefix/bin
}
