# Contributor: A. Wilcox <awilfox@adelielinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=libuninameslist
pkgver=20190305
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="4dc30a4f0919722c7538ed2eda39c3e63d072ee17c809ca25e0b6546d29110607c27c6e969839439c1432b4b40fca3e888c428ed26d1e0328a5f481a2db3cc73  libuninameslist-dist-20190305.tar.gz"