# Contributor: Thomas Kienlen <kommander@laposte.net>
# Maintainer: Thomas Kienlen <kommander@laposte.net>
pkgname=libkiwix
pkgver=13.1.0
pkgrel=2
pkgdesc="Common code base for all Kiwix ports"
url="https://github.com/kiwix/libkiwix"
license="GPL-3.0-or-later"
arch="all"
depends="aria2"
makedepends="
	curl-dev
	gtest-dev
	icu-data-full
	libmicrohttpd-dev
	libzim-dev
	meson
	mustache
	pugixml-dev
	python3
	samurai
	xapian-core-dev
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/kiwix/libkiwix/archive/$pkgver.tar.gz
	icu76.patch"
subpackages="$pkgname-dev $pkgname-doc"
replaces="kiwix-lib" # for backward compatibility
provides="kiwix-lib=$pkgver-r$pkgrel" # for backward compatibility

build() {
	abuild-meson . build
	ninja -C build
}

check() {
	meson test --print-errorlogs -C build
}

package() {
	DESTDIR="$pkgdir" meson install -C build --no-rebuild
}

sha512sums="
f1ecd14117e6805011dbcc3ec682ea330194433587224f2cc0874d6c9534d948fa1514d9c6c311c022372ab43456e3f5f1bdbf0fb0ef562fcfcfe20696048ade  libkiwix-13.1.0.tar.gz
cb27ce24428e75e1a81f110ef65025ea3ab1a6af26b72327ab29bab5087436fe2067349874812a28024f2f9da8c157ccd81d4f374d6f946abda9f4ee476c73a6  icu76.patch
"
