#!/usr/bin/bash
# JOBoRun		: Jwm OpenBox Obarun RUNit
# Maintainer		: Joe Bo Run <joborun@disroot.org>
# PkgSource		: url="https://gittea.disroot.org/joborun-pkg/jobcextra/$pkgname"
#-----------------------------------------| DESCRIPTION |---------------------------------------

pkgname=libinput
pkgver=1.19.3
pkgrel=02
pkgdesc="Input device management and event handling library"
url="https://www.freedesktop.org/wiki/Software/libinput/"
arch=(x86_64)
depends=('mtdev' 'libevdev' 'libwacom')
# upstream doesn't recommend building docs
makedepends=('gtk3' 'meson' 'wayland-protocols' 'cmake' 'gtk4') # 'doxygen' 'graphviz' 'python-sphinx' 'python-recommonmark'
optdepends=('gtk3: libinput debug-gui'
            'python-pyudev: libinput measure'
            'python-libevdev: libinput measure')
source=(https://freedesktop.org/software/$pkgname/$pkgname-$pkgver.tar.xz{,.sig})

build() {
  arch-meson $pkgname-$pkgver build \
    -D b_lto=false \
    -D udev-dir=/usr/lib/udev \
    -D tests=false \
    -D documentation=false
  meson compile -C build
}

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

  install -Dvm644 $pkgname-$pkgver/COPYING \
    "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

#---- license gpg-key sha256sums ----

license=(custom:X11)

validpgpkeys=('3C2C43D9447D5938EF4551EBE23B7E70B467F0BF') # Peter Hutterer (Who-T) <office@who-t.net>

sha256sums=(3cae78ccde19d7d0f387e58bc734d4d17ab5f6426f54a9e8b728c90b17baa068 # libinput-1.19.3.tar.xz
	db134d7f37e85160373f7377bacd6bd33ffe6a25b756d927ef63e9809b7107fd) #  libinput-1.19.3.tar.xz.sig
 
