pkgname=libinput
pkgver=1.29.1
pkgdesc="Input device management and event handling library"
homepage="https://wayland.freedesktop.org/libinput/doc/latest/"
arch=(x86_64)
license=(MIT)
depends=(
  gcc
  glibc
  libevdev
  systemd
)
makedepends=(
  meson
  python
)
sources=("${pkgname}-${pkgver}.tar.bz2")
urls=("https://gitlab.freedesktop.org/${pkgname}/${pkgname}/-/archive/${pkgver}/${sources[0]}")
md5sums=("bdbf0aa43f4adde2e3137f28c29361c6")

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

src_build() {
  local meson_args=(
    --prefix=/usr
    --buildtype=release
    -D documentation=false
    -D debug-gui=false
    -D libwacom=false
    -D tests=false
    -D mtdev=false
  )
  meson setup build "${meson_args[@]}"
  meson compile -C build
}

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

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