# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=yubikey-manager-qt
pkgver=1.2.6
pkgrel=0
pkgdesc="Cross-platform application for configuring any YubiKey over all USB transports"
url="https://developers.yubico.com/yubikey-manager-qt/"
arch="all !armhf" # armhf blocked by qt5-qtdeclarative
license="BSD-2-Clause"
depends="py3-ykman python3 py3-pyotherside qt5-qtquickcontrols
	qt5-qtgraphicaleffects yubikey-manager"
makedepends="qt5-qtbase-dev qt5-qtdeclarative-dev qt5-qtquickcontrols2-dev"
options="!check" # No test suite present
source="https://github.com/Yubico/yubikey-manager-qt/archive/yubikey-manager-qt-$pkgver.tar.gz
	use-py3.patch"
builddir="$srcdir/$pkgname-$pkgname-$pkgver"

# secfixes:
#   0:
#     - YSA-2024-01

build() {
	qmake-qt5
	make
}

package() {
	make INSTALL_ROOT="$pkgdir" install
	install -D -m0644 resources/ykman-gui.desktop "$pkgdir"/usr/share/applications/ykman-gui.desktop
	install -D -m0644 resources/icons/ykman.png "$pkgdir"/usr/share/pixmaps/ykman.png
}

sha512sums="
e9a003eb5dca16956385e75d4cc0df05a1fb587339f3dfb2cf5a38fef5005883c3c74a80b7015d1cdde21c396292bcdc56f42c65abfa6e2bfdf3b764818ea393  yubikey-manager-qt-1.2.6.tar.gz
d3c0c11032ac7dbfc8d48f08766d3d98061f7382008f7ee257ac2fe4150fc20b14c0003b59b9a642259365b105700d52b6b2ebf4343fb5dfa72125a36a9fe6fb  use-py3.patch
"
