# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=poweralertd
pkgver=0.3.0
pkgrel=0
pkgdesc="UPower-powered power alerter"
url="https://git.sr.ht/~kennylevinsen/poweralertd"
license="GPL-3.0"
arch="all !s390x !riscv64" # limited by upower
depends="upower"
makedepends="basu-dev meson scdoc"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~kennylevinsen/poweralertd/archive/$pkgver.tar.gz"

build() {
	abuild-meson \
		-Dman-pages=enabled \
		. output
	meson compile -C output
}

check() {
	meson test --no-rebuild --print-errorlogs -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
db1760b536059607677781b4ac91811aedebb083ca3af90c5b328a9dd4bdd916bb0d89f553a2bf6066f88b91dcf11cb7ded35cda9f7085467138aa29c12d4ea1  poweralertd-0.3.0.tar.gz
"
