pkgname=xkeyboard-config
pkgver=2.46
pkgdesc="X keyboard configuration files"
arch=(any)
license=('LicenseRef-xkeyboard-config')
homepage="https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config"
makedepends=('libxslt' 'python' 'meson')
sources=("${pkgname}-${pkgver}.tar.xz")
urls=("https://www.x.org/releases/individual/data/${pkgname}/${sources[0]}")
md5sums=("ca851f0e5bc0f52f2fb4629babc344c1")

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

src_build() {
  local mesonargs=(
    --prefix=/usr
    --wrap-mode=nodownload
    --buildtype=release
    -Dcompat-rules=true
  )
  meson setup build "${mesonargs[@]}"
  meson configure build --no-pager
  meson compile -C build
}

src_install() {
  DESTDIR="$pkgdir" ninja -C build install
  install -m755 -d "${pkgdir}/var/lib/xkb"
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 COPYING
}

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