# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=libuninameslist
pkgver=20190701
pkgrel=0
pkgdesc="Library of Unicode names and annotation data"
url=" "
arch="all"
license="BSD-3-Clause"
depends=""
makedepends="python3-dev"
subpackages="$pkgname-dev $pkgname-doc py3-uninameslist:py3:noarch"
source="https://github.com/fontforge/libuninameslist/releases/download/$pkgver/libuninameslist-dist-$pkgver.tar.gz"

build() {
	PYTHON=python3 ./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

py3() {
	pkgdesc="$pkgdesc (Python 3 bindings)"
	depends="python3"
	cd "$builddir"/py
	python3 setup.py install --prefix=/usr --root="$subpkgdir"
}

sha512sums="05cd3cbba195e270e1cb23886d0fa666d47fbe5eb23b89388025683ae7e2380de43ac4137056ec8f386e53fc869218e7417566f29ccfd86f26168bcfe472ee52  libuninameslist-dist-20190701.tar.gz"