# Contributor: Rabindra Dhakal <contact@qaidvoid.dev>
maintainer="Zach DeCook <zachdecook@librem.one>"
pkgname=hyprlang
pkgver=0.6.3
pkgrel=0
pkgdesc="The official implementation library for the hypr config language."
url="https://hyprland.org/hyprlang/"
arch="all"
license="LGPL-3.0-only"
makedepends="cmake hyprutils-dev>=0.7.1 samurai"
subpackages="$pkgname-doc $pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/hyprwm/hyprlang/archive/v$pkgver.tar.gz"

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

check() {
	ctest --test-dir build
}

package() {
	DESTDIR="$pkgdir" cmake --install build

	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="
43fc061574bcc81f6c247670c51c432b6db77cc06c027a1cf195bac5ef015f4c32f4c0cb97f901378ff5d1250b727b8c2b7191643b3dac592eb745a1612dd12d  hyprlang-0.6.3.tar.gz
"
