# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=libzdb
pkgver=3.1
pkgrel=2
pkgdesc="A thread-safe high level multi-database connection pool library"
url="http://www.tildeslash.com/libzdb/"
arch="all"
license="GPL"
depends_dev="flex-dev sqlite-dev mariadb-connector-c-dev postgresql-dev"
makedepends="$depends_dev flex"
subpackages="$pkgname-dev"
source="http://www.tildeslash.com/libzdb/dist/libzdb-$pkgver.tar.gz
	test-makefile.patch"
builddir="$srcdir/$pkgname-$pkgver"

build() {
	cd "$builddir"
	./configure --prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--enable-optimized \
		--infodir=/usr/share/info
	make || return 1
}

check() {
	cd "$builddir"
	make verify
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install || return 1
}

sha512sums="7cf24ccf0f0a938955d8b54af2c6eca8a8f700737beafde9e824129f324511e06adbc11a3fdbd6ad6d9b902fdae6f7caab4e5c1c594d2211be314e3a24c697f3  libzdb-3.1.tar.gz
9e4ec8142ccae4b599f806568436179bd1c5847d32a2ae2979fd74cb035c4b00f9cd8bbc58f18231304ed81db62562c44b49eeb5a54e1822c81cca31e4289676  test-makefile.patch"
