pkgname=libevdev
pkgver=1.13.5
pkgdesc="Wrapper library for evdev devices"
arch=(x86_64)
url="https://www.freedesktop.org/wiki/Software/libevdev/"
license=('MIT')
depends=('glibc')
makedepends=('python' 'meson')
sources=("${pkgname}-${pkgver}.tar.xz")
urls=("https://www.freedesktop.org/software/libevdev/${sources[0]}")
md5sums=("582e2ae5a076a34d479d420776f8fd27")

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

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

src_check() {
  meson test -C build
}

src_install() {
  DESTDIR="$pkgdir" meson install -C build

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

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