aboutsummaryrefslogtreecommitdiffstats
path: root/main/lmdb/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'main/lmdb/APKBUILD')
-rw-r--r--main/lmdb/APKBUILD51
1 files changed, 51 insertions, 0 deletions
diff --git a/main/lmdb/APKBUILD b/main/lmdb/APKBUILD
new file mode 100644
index 0000000000..71698bcffd
--- /dev/null
+++ b/main/lmdb/APKBUILD
@@ -0,0 +1,51 @@
+# Contributor: Olivier Mauras <olivier@mauras.ch>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=lmdb
+pkgver=0.9.22
+pkgrel=1
+pkgdesc="Lightning Memory-Mapped Database"
+url="http://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"
+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="49afca13b9683ed571c274380bb5e111236903b12d19bcb8781d6bbc00f711766b0d62de0b36536c85309cc9ff9e9d0aaa708e27bae9be6cfcaed8ba91e5545d LMDB_0.9.22.tar.gz
+1ae28e850a32694f81cb7bf4abaab9cd96ef6c963de91f96810de3afee4da41102e310a6fb0ed889e9e9e04e00342f25272c04a8b483615dccfc039e34538594 lmdb-make.patch"