# Contributor: Zach DeCook <zachdecook@librem.one>
maintainer="Zach DeCook <zachdecook@librem.one>"
pkgname=hyprwayland-scanner
pkgver=0.4.4
pkgrel=0
pkgdesc="Hyprland implementation of wayland-scanner for C++"
url="https://github.com/hyprwm/hyprwayland-scanner"
arch="all"
license="BSD-3-Clause"
source="https://github.com/hyprwm/hyprwayland-scanner/archive/v$pkgver/hyprwayland-scanner-v$pkgver.tar.gz"
makedepends="cmake samurai pugixml-dev"
subpackages="$pkgname-doc"

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="
c0f4670fa39edee43a05f9d7a3f3d60b793034cdf9e351f6cda60a72481f4a212c78ed5b4c15481df20acab86b987843691037fba0e62efe906196181c64b2eb  hyprwayland-scanner-v0.4.4.tar.gz
"
