# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Robin Candau <antiz@archlinux.org>
# Contributor: Aleksana QWQ <me@aleksana.moe>

pkgname=hyfetch
pkgver=1.99.0
pkgrel=1
pkgdesc="Neofetch with LGBTQ+ pride flags!"
arch=(any)
url='https://github.com/hykilpikonna/hyfetch'
license=('MIT')
depends=('python-setuptools')
makedepends=('python-build' 'python-installer' 'python-wheel')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/${pkgver}.tar.gz")
sha256sums=('c712a11a354b34a86c86e7b080ee5e63faa6db5b8a88a3ebea35ef67c33588fd')

build() {
	cd "${pkgname}-${pkgver}"
	python -m build --wheel --no-isolation
}

package() {
	cd "${pkgname}-${pkgver}"
	python -m installer --destdir="${pkgdir}" dist/*.whl

	install -Dm 644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
	install -Dm 644 LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
	install -Dm 644 "docs/${pkgname}.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1"
	install -Dm 644 "${pkgname}/scripts/autocomplete.bash" "${pkgdir}/usr/share/bash-completion/completions/${pkgname}"
	install -Dm 644 "${pkgname}/scripts/autocomplete.zsh" "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
}
