# Contributor: Zach DeCook <zachdecook@librem.one>
maintainer="Zach DeCook <zachdecook@librem.one>"
pkgname=hyprutils
pkgver=0.2.4
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 pixman-dev"
subpackages="$pkgname-doc $pkgname-dev"

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

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE ctest
}

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


sha512sums="
cb4cbd2e3c5162f96be14b520ca7891c41c285c1819fd56fa495dc72c8f12735afe9ed82ebe475bbc55b4c7494b07542f655103157296af87a383c6ab07277f3  hyprutils-v0.2.4.tar.gz
"
