pkgname="hyprwayland-scanner"
pkgver=0.4.4
pkgdesc="A Hyprland implementation of wayland-scanner, in and for C++"
arch=(x86_64)
homepage="https://github.com/hyprwm/hyprwayland-scanner"
license=('BSD-3-Clause')
depends=('pugixml')
makedepends=('git' 'cmake' 'gcc')
sources=("${pkgname}-${pkgver}.tar.gz")
urls=("https://github.com/hyprwm/${pkgname}/archive/v${pkgver}.tar.gz")
md5sums=("a1a3c08298d8cf6138566c83f2e18d50")

src_prepare() {
  tar -xf ${distdir}/${sources[0]} --strip-components=1
}

src_build() {
  cmake -B build \
    -D CMAKE_INSTALL_PREFIX=/usr \
    -D CMAKE_BUILD_TYPE=Release
  cmake --build build
}

src_install() {
  DESTDIR="$pkgdir" cmake --install build
  install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE
}

# vim:ft=sh syn=sh et sw=2:
