# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer:
pkgname=leveldb
pkgver=1.20
pkgrel=0
pkgdesc="A fast and lightweight key/value database library by Google"
url="https://github.com/google/leveldb"
arch="all"
license="BSD"
makedepends="snappy-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/google/$pkgname/archive/v$pkgver.tar.gz"

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

build() {
	cd "$builddir"
	make
}

package() {
	cd "$builddir"
	mkdir -p "$pkgdir"/usr/lib "$pkgdir"/usr/share/doc
	cp -a out-shared/lib*.so* "$pkgdir"/usr/lib
	cp -a include "$pkgdir"/usr/
	cp -a doc "$pkgdir"/usr/share/doc/$pkgname

}

sha512sums="c59258f2f58ce2d5680e9ab3da4ab0923d91cd4648dcf63cdaa26cdde92bf45e094544539ad11d8e09a4a4813435286143ed0e86c21c6c31a0596903ed4744d2  leveldb-1.20.tar.gz"
