# Contributor: j.r <j.r@jugendhacker.de>
# Maintainer: j.r <j.r@jugendhacker.de>
pkgname=py3-tg
_pyname=tg
pkgver=0.19.0
pkgrel=5
pkgdesc="Terminal telegram client that really works"
url="https://github.com/paul-nameless/tg"
arch="noarch !s390x"
license="Unlicense"
depends="python3 py3-telegram"
makedepends="py3-gpep517 py3-poetry-core"
subpackages="$pkgname-pyc"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/paul-nameless/tg/archive/refs/tags/v$pkgver.tar.gz
	0001-Allow-newer-python-telegram.patch
	"
builddir="$srcdir/$_pyname-$pkgver"
options="!check"

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

package() {
	gpep517 install-wheel --destdir "$pkgdir" \
		.dist/*.whl
}

sha512sums="
ccaba3614d72d7fc115d8f6e1cb51c52a5e7be3b588a8135c9435226df98c55a4f3184c1e280e26913e982c65cc393f09981ed2612adbdd718bfc70d4ad28ffe  py3-tg-0.19.0.tar.gz
3a9c5e546f388842aa6f270bbf86cc45f98f29779fed02d2c381d7e35f2435f883bfea43bf6448e9c9cbace8be51494a97ecbc8aebe9c23b412aec059bfa757e  0001-Allow-newer-python-telegram.patch
"
