pkgname = "libinput"
pkgver = "1.19.4"
pkgrel = 0
build_style = "meson"
configure_args = [
    "-Ddocumentation=false", "-Dtests=true",
    "-Ddebug-gui=false", "-Db_ndebug=false"
]
hostmakedepends = ["meson", "pkgconf"]
makedepends = [
    "libevdev-devel", "mtdev-devel", "udev-devel", "libwacom-devel",
]
checkdepends = ["check-devel", "bash"]
pkgdesc = "Input abstraction library for Wayland and X"
maintainer = "q66 <q66@chimera-linux.org>"
license = "MIT"
url = "https://www.freedesktop.org/wiki/Software/libinput"
source = f"$(FREEDESKTOP_SITE)/{pkgname}/{pkgname}-{pkgver}.tar.xz"
sha256 = "ff33a570b5a936c81e6c08389a8581c2665311d026ce3d225c88d09c49f9b440"

def post_install(self):
    self.install_license("COPYING")

@subpackage("libinput-devel")
def _devel(self):
    self.depends += makedepends
    return self.default_devel()
