# Maintainer: sprinterz5 <63397324+sprinterz5@users.noreply.github.com>
pkgname=asus-tso-helper
pkgver=0.6.1
pkgrel=1
pkgdesc="asusctl and Cardwire in one app: ASUS laptop modes, GPU, fans and battery"
arch=(any)
url="https://github.com/sprinterz5/asus-tso-helper"
license=(GPL-3.0-only ISC)
depends=(python pyside6 python-evdev python-dbus asusctl hicolor-icon-theme)
optdepends=('cardwire: Eco / Standard GPU modes (AUR)'
            'swayidle: keyboard backlight timeout'
            'libkscreen: refresh rate on KDE Plasma')
makedepends=(make)
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha256sums=('6fba738222a27248d83a6d282371f68125bc7e119a0cbe488e1c5f37d60526cc')

package() {
    cd "$pkgname-$pkgver"
    make install DESTDIR="$pkgdir" PREFIX=/usr
    python -m compileall -q -d /usr/share/$pkgname "$pkgdir/usr/share/$pkgname"
    install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
    install -Dm644 asus_tso_helper/assets/icons/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE.lucide"
}
