# Template file for 'sdb'
pkgname=sdb
version=0.7.1
revision=1
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="libglib-devel vala-devel"
short_desc="Simple key-value database with JSON support"
maintainer="pancake <pancake@nopcode.org>"
license="LGPL-3"
homepage="https://github.com/radare/sdb"

do_fetch() {
	git clone -b ${version} git://github.com/radare/sdb.git sdb-${version}
}

post_install() {
	# Create shlib symlinks.
	ln -sfr ${DESTDIR}/usr/lib/libsdb.so.0.0.0 ${DESTDIR}/usr/lib/libsdb.so
	ln -sfr ${DESTDIR}/usr/lib/libsdb.so.0.0.0 ${DESTDIR}/usr/lib/libsdb.so.0
}

sdb-devel_package() {
	depends="sdb>=${version}_${revision}"
	short_desc+=" - development files"
	pkg_install() {
		vmove usr/include
		vmove usr/share
		vmove usr/lib/pkgconfig
		vmove "usr/lib/*.a"
		vmove "usr/lib/*.so"
	}
}
