# Contributor: omni <omni+alpine@hack.org>
# Maintainer: omni <omni+alpine@hack.org>
pkgname=zulip-term
_pkgname=zulip-terminal
pkgver=0.7.0
pkgrel=6
pkgdesc="official terminal client for Zulip"
url="https://github.com/zulip/zulip-terminal"
arch="noarch"
license="Apache-2.0"
depends="
	py3-beautifulsoup4
	py3-dateutil
	py3-lxml
	py3-pygments
	py3-pyperclip
	py3-tz
	py3-tzlocal
	py3-urwid
	py3-urwid_readline
	py3-zulip
	"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-doc $pkgname-pyc"
options="!check" # legacy dependencies
source="$pkgname-$pkgver.tar.gz::https://github.com/zulip/zulip-terminal/archive/$pkgver.tar.gz
	typing-ext.patch
	"
builddir="$srcdir/$_pkgname-$pkgver"

build() {
	gpep517 build-wheel --wheel-dir .dist --output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" .dist/*.whl

	install -Dm0644 -t "$pkgdir"/usr/share/doc/"$pkgname" \
		docs/getting-started.md \
		docs/FAQ.md
	install -Dm0644 LICENSE -t "$pkgdir"/usr/share/doc/"$pkgname"
}

sha512sums="
99151b882a499f213440621cb685717f959816c14868148e43cf15404c45d1119fe7518d5ae6386eaaeb766a1ae87ca45847803e541f4ea9719d6d77babe8528  zulip-term-0.7.0.tar.gz
9b854f9adbe0b68a4923a8a2eab95e9dd1feeb781da1106192ee2f54073f3a3f5a22c72aca7676dd5e97035fd86b304dc2b80f9273ff4050be498702a428b4b3  typing-ext.patch
"
