# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Andreas Radke <andyrtr@archlinux.org>

pkgname=libwacom
pkgver=2.14.0
pkgrel=1
pkgdesc="Library to identify Wacom tablets and their features"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://github.com/linuxwacom/libwacom/wiki"
license=('MIT')
depends=('glib2' 'libevdev' 'libgudev' 'glibc')
makedepends=('libxml2' 'meson' 'python-pytest' 'python-libevdev' 'python-pyudev')
optdepends=('python-libevdev: for libwacom-show-stylus'
            'python-pyudev: for libwacom-show-stylus')
source=(https://github.com/linuxwacom/libwacom/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.xz{,.sig})
# https://github.com/linuxwacom/libwacom/releases
sha256sums=('5900b3ad3d780e1b864103ace99cace9470db727a162517e1648c86a1bdec0e3'
            'SKIP')
validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # "Peter Hutterer (Who-T) <office@who-t.net>"
#validpgpkeys=('594ABBA066118C7A02D10A80A8AF906D9307FBAD') # "Joshua Dickens <Joshua@Joshua-Dickens.com>"

build() {
  arch-meson $pkgname-$pkgver build
  # Print config
  meson configure build
  meson compile -C build
}

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

package() {
  meson install -C build --destdir "$pkgdir"
  install -D -m644 $pkgname-$pkgver/COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
