# Template file for 'LACT'
pkgname=LACT
version=0.9.0
revision=1
build_style=cargo
make_check_args="-- --skip app::root_stack::thermals_page::fan_curve_frame::tests::set_get_curve"
hostmakedepends="pkg-config blueprint-compiler gtk4-devel llvm19-devel"
makedepends="gtk4-devel libadwaita-devel"
short_desc="Linux AMDGPU Control Application"
maintainer="Daniel Martinez <danielmartinez@cock.li>"
license="MIT"
homepage="https://github.com/ilya-zlobintsev/LACT"
distfiles="https://github.com/ilya-zlobintsev/LACT/archive/refs/tags/v${version}.tar.gz"
checksum=4a422ef394351704b6506d97e1a8ff262b8cd9af4b81ef1e096bc60c22797bf8
make_check=ci-skip # detects intel GPU in github CI pipeline

if [ "$XBPS_TARGET_WORDSIZE" = 32 ]; then
	broken="libdrm_amdgpu_sys crate only supports 64bit"
fi

do_install() {
	vsv lact

	vbin target/$RUST_TARGET/release/lact

	vinstall res/lactd.service                          644 usr/lib/systemd/system
	vinstall res/io.github.ilya_zlobintsev.LACT.desktop 644 usr/share/applications
	vinstall res/io.github.ilya_zlobintsev.LACT.png     644 usr/share/pixmaps
	vinstall res/io.github.ilya_zlobintsev.LACT.svg     644 usr/share/icons/hicolor/scalable/apps

	vlicense LICENSE
}
