# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libevdev
pkgver=1.13.3
pkgrel=0
pkgdesc="Kernel Evdev Device Wrapper Library"
url="https://www.freedesktop.org/wiki/Software/libevdev"
arch="all"
license="MIT"
options="!check"  # Requires CONFIG_INPUT_UINPUT in kernel
depends_dev="linux-headers"
makedepends="
	$depends_dev
	doxygen
	meson
	python3
	"
subpackages="$pkgname-dev $pkgname-doc $pkgname-tools"
source="https://freedesktop.org/software/libevdev/libevdev-$pkgver.tar.xz"

build() {
	abuild-meson \
		-Db_lto=true \
		-Dtests=disabled \
		-Ddocumentation=enabled \
		-Dcoverity=false \
		. output
	meson compile -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

tools() {
	pkgdesc="$pkgdesc (tools)"
	amove usr/bin
}

sha512sums="
24330c7f6f003c95da97dcb66fcc750437db59ac9049415c35cbcaa1612845363a59180da6b3120c81d7d3f969adb139fa023ed765223e185fb68465d45a0fd2  libevdev-1.13.3.tar.xz
"
