# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
setvar pkgname = 'tdb'
setvar pkgver = '1.3.15'
setvar pkgrel = '0'
setvar pkgdesc = ""The tdb library""
setvar url = ""http://tdb.samba.org/""
setvar arch = ""all""
setvar license = ""LGPLv3+""
setvar depends_dev = ""python2""
setvar makedepends = ""$depends_dev python2-dev docbook-xsl""
setvar subpackages = ""$pkgname-dev py-$pkgname:_py $pkgname-libs $pkgname-doc""
setvar source = ""http://samba.org/ftp/tdb/tdb-$pkgver.tar.gz
	""

setvar builddir = ""$srcdir/$pkgname-$pkgver""

proc build {
	cd $builddir
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--localstatedir=/var \
		--disable-rpath \
		--bundled-libraries=NONE \
		--builtin-libraries=replace
	make
}

proc check {
	cd $builddir
	make check
}

proc package {
	cd $builddir
	make DESTDIR="$pkgdir" install
}

proc _py {
	setvar pkgdesc = ""Python binding for the tdb library""
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/python* "$subpkgdir"/usr/lib/
}

proc libs {
	default_libs
	setvar replaces = ""tdb""
}

setvar sha512sums = ""553246d5e7a7c22ea1b00962ac635d608f6d2344201862e796cad3b1a20610da1f5652ec9dbcb0187867fbd25f36247fcc34e9b4b2c3488c15d7202c9fb13bbb  tdb-1.3.15.tar.gz""