# Maintainer: j.r <j.r@jugendhacker.de>
# Adapted to Slint by Didier Spaier didieratslintdotfr

pkgname=tg
pkgver=0.19.0
pkgrel=1slint
slackdesc="tg (terminal telegram client that really works)"
url="https://github.com/paul-nameless/tg"
license=('Unlicense')
depends=('python-telegram=0.15.0' 'python3' 'python-setuptools')
optdepends=(
	'libnotify: for notifications, you could also use other programs: see config'
	'ffmpeg: to record voice msgs and upload videos correctly'
	'urlview: to choose urls when there is multiple in message, use URL_VIEW in config file to use another app, it should accept urls in stdin'
	'ranger: can be used to choose file when sending, customizable with FILE_PICKER_CMD'
	'nnn: can be used to choose file when sending, customizable with FILE_PICKER_CMD'
	'fzf: to create groups and secret chats, used for single and multiple user selection'
)
conflicts=('telegram-tg-git')
source=("https://github.com/paul-nameless/tg/archive/v$pkgver.tar.gz")
md5sums=('a9b619805bf79f6f92093e3f96e54125')
options=("nosrcpack")
docs=(UNLICENSE readme.md tg-screenshit.png)
build() {
	cd "${pkgname}-${pkgver}"
	python3 setup.py build
	python3 setup.py install --root="$PKG" --optimize=1 --skip-build
	mkdir -p $PKG/usr/doc/${pkgname}-${pkgver}
	pandoc -s -f markdown_github -t html5 readme.md -o $PKG/usr/doc/${pkgname}-${pkgver}/README.html
}
