pkgname=wayland-protocols
pkgver=1.45
pkgdesc='Specifications of extended Wayland protocols'
arch=('any')
homepage='https://wayland.freedesktop.org/'
license=('MIT')
makedepends=('wayland' 'meson')
sources=("${pkgname}-${pkgver}.tar.xz")
urls=("https://gitlab.freedesktop.org/wayland/$pkgname/-/releases/$pkgver/downloads/${sources[0]}")
md5sums=("a235baeab3f1c6d57ac4c7c00ecd7e48")

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

src_build() {
  meson setup build --prefix=/usr --buildtype=release
  meson compile -C build
}

src_check() {
  meson test -C build --print-errorlogs
}

src_install() {
  meson install -C build --destdir "$pkgdir"
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m 644 COPYING
}

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