# Contributor: Andrey L <innerspacepilot@gmx.com>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kyotocabinet
pkgver=1.2.80
pkgrel=0
pkgdesc="library of routines for managing a database"
url="https://dbmx.net/kyotocabinet/"
arch="all"
license="GPL-3.0-or-later"
makedepends="
	lzo-dev
	xz-dev
	zlib-dev
	"
subpackages="$pkgname-dev $pkgname-doc"
source="https://dbmx.net/kyotocabinet/pkg/kyotocabinet-$pkgver.tar.gz"

case "$CARCH" in
	# Failing tests
	x86|armv7|ppc64le|s390x) options="!check" ;;
esac

build() {
	./configure \
		--prefix=/usr \
		--enable-lzo \
		--enable-lzma \
		--disable-opt
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	rm -f "$pkgdir"/usr/lib/*.a
}

sha512sums="
9fe0a92c9a76db5ce06ef4d5a551c05930f2a9c065ab695b030fdaf45692bfe88d91f1b75791f50d0772c699567744cd74f3ef407172874d4bba467989d54328  kyotocabinet-1.2.80.tar.gz
"
