# Contributor: Zach DeCook <zachdecook@librem.one>
maintainer="Zach DeCook <zachdecook@librem.one>"
pkgname=hyprutils
pkgver=0.7.1
pkgrel=0
pkgdesc="Hyprland utilities library used across the ecosystem"
url="https://github.com/hyprwm/hyprutils"
arch="all"
license="BSD-3-Clause"
source="https://github.com/hyprwm/hyprutils/archive/v$pkgver/hyprutils-v$pkgver.tar.gz"
makedepends="cmake samurai pixman-dev"
subpackages="$pkgname-doc $pkgname-dev"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_BUILD_TYPE=None
	cmake --build build
}

check() {
	cd build
	ctest
}

package() {
	DESTDIR="$pkgdir" cmake --install build
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}


sha512sums="
3f0019affb212f71c04b4f79c41bb2fc9a2d382c93af23afc2207c487f018ce2fe3cf5e0d187dffc39b4da6a5f6821fcb151b5935917e9a8ecc12e2cb5beb978  hyprutils-v0.7.1.tar.gz
"
