# Template file for 'boxflat'
pkgname=boxflat
version=1.35.3
revision=1
depends="python3 gtk4 libadwaita cairo gobject-introspection python3-yaml
 python3-psutil python3-pyserial python3-cairo python3-gobject python3-evdev"
short_desc="Adjust your Moza Racing gear settings"
maintainer="Sebastian Ornig <seb@sornig.eu>"
license="GPL-3.0-only"
homepage="https://github.com/Lawstorant/boxflat"
distfiles="https://github.com/Lawstorant/boxflat/archive/refs/tags/v${version}.tar.gz"
checksum=94b68668bc3fccfffad487328bfc22f0262d363ae0cc08313a707b0cb5f1f343

do_install() {
	vmkdir usr/share/boxflat
	vcopy boxflat usr/share/boxflat
	vcopy data usr/share/boxflat
	vcopy udev usr/share/boxflat
	vinstall entrypoint.py 644 usr/share/boxflat

	for _meta in *metainfo.xml; do
		vinstall "${_meta}" 644 usr/share/metainfo
	done

	vmkdir usr/share/icons/hicolor/
	vcopy icons/* usr/share/icons/hicolor

	vbin boxflat.sh boxflat

	for _desktop in *.desktop; do
		vinstall "${_desktop}" 644 usr/share/applications/
	done

	for _rule in udev/*; do
		vinstall "${_rule}" 644 usr/lib/udev/rules.d
	done
}
