# Contributor: Olivier Mauras # Maintainer: Natanael Copa pkgname=lmdb pkgver=0.9.23 pkgrel=0 pkgdesc="Lightning Memory-Mapped Database" url="https://symas.com/mdb" arch="all" license="OLDAP-2.8" subpackages="$pkgname-dev $pkgname-doc $pkgname-tools" source="https://github.com/LMDB/lmdb/archive/LMDB_$pkgver.tar.gz lmdb-make.patch cacheflush.patch " builddir="$srcdir/$pkgname-LMDB_$pkgver/libraries/liblmdb" build() { cd "$builddir" make CFLAGS+="-fPIC" } check() { cd "$builddir" LD_LIBRARY_PATH="$PWD" make test } package() { cd "$builddir" make DESTDIR="$pkgdir" prefix=/usr install mkdir -p "$pkgdir"/usr/lib/pkgconfig cat >"$pkgdir"/usr/lib/pkgconfig/lmdb.pc <<-EOF prefix=/usr exec_prefix=\${prefix} libdir=\${exec_prefix}/lib includedir=\${prefix}/include Name: liblmdb Description: Lightning Memory-mapped key-value database URL: http://symas.com/mdb/ Version: @PACKAGE_VERSION@ Libs: -L\${libdir} -llmdb Cflags: -I\${includedir} EOF } tools() { mkdir -p "$subpkgdir"/usr mv "$pkgdir"/usr/bin "$subpkgdir"/usr } sha512sums="47466a96ce288d18d489acf1abf811aa973649848a4cac31f71e1f25ea781a055ebd6616d2d630214b2df2f146f12609c82d65be0196f49d6b46a6c96464e120 LMDB_0.9.23.tar.gz 1ae28e850a32694f81cb7bf4abaab9cd96ef6c963de91f96810de3afee4da41102e310a6fb0ed889e9e9e04e00342f25272c04a8b483615dccfc039e34538594 lmdb-make.patch f30b5f60ad3788abe3caa91a787c00190d6cceef5d20339624ce3d128f59de1a65d6913ab28f938c52237c40cbaef8a2bff2be7158da32f8c4562aa240fd11a2 cacheflush.patch"