# Template file for 'heimdall'
pkgname=heimdall
version=2.2.2
revision=1
build_style=cmake
hostmakedepends="pkg-config qt6-base-devel"
makedepends="libusb-devel qt6-base-devel"
short_desc="Tool suite used to flash firmware onto Samsung Galaxy devices"
maintainer="Orphaned <orphan@voidlinux.org>"
license="MIT"
homepage="https://git.sr.ht/~grimler/Heimdall"
distfiles="https://git.sr.ht/~grimler/Heimdall/archive/v${version}.tar.gz"
checksum="7d01dd8bf9c2f93ea016ae8b059110c50cea49e78670e8a1333ebd5899cdaaa3"

heimdall-frontend_package() {
	short_desc+=" - Qt6 GUI"
	depends="${sourcepkg}>=${version}_${revision}"
	pkg_install() {
		vmove usr/bin/heimdall-frontend
	}
}

do_install() {
	vbin build/bin/heimdall
	vbin build/bin/heimdall-frontend
	vinstall heimdall/60-heimdall.rules 644 usr/lib/udev/rules.d
	vlicense LICENSE
}
