#Maintainer: Dimitris Tzemos <djemos(at)slackel.gr>

pkgname=qjson
pkgver=0.7.1
pkgrel=1rl
source=("http://downloads.sourceforge.net/project/qjson/qjson/0.7.1/$pkgname-$pkgver.tar.bz2")
sourcetemplate=http://people.salixos.org/djemos/salix/$pkgname
url="http://qjson.sourceforge.net/"
docs=('INSTALL' 'README' 'COPYING')

slackdesc=\
(
#|-----handy-ruler------------------------------------------------------|
"QJson (the easiest way to manage JSON objects with Qt)"
"QJson is a qt-based library that maps JSON data to QVariant objects:"
"JSON arrays will be mapped to QVariantList instances, while"
"JSON's objects will be mapped to QVariantMap."
""
"HomePage: http://qjson.sourceforge.net/"

)

build() {
	# how many build jobs?
	JOBS="-j$(($(getconf _NPROCESSORS_ONLN)*2))"
	NUMJOBS="${NUMJOBS:-"${JOBS}"}"

	cd $startdir/src/$pkgname
	mkdir build
	cd build
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_BUILD_TYPE=Release \
		-DLIB_SUFFIX=${LIBDIRSUFFIX} \
		..

	make $NUMJOBS || return 1
	make DESTDIR=$startdir/pkg/ install || return 1
}