# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libmanette
pkgver=0.2.12
pkgrel=0
pkgdesc="Simple GObject game controller library"
url="https://gnome.pages.gitlab.gnome.org/libmanette/"
arch="all"
license="LGPL-2.1-or-later"
makedepends="
	glib-dev
	gobject-introspection-dev
	hidapi-dev
	libevdev-dev
	libgudev-dev
	meson
	vala
	"
subpackages="$pkgname-dev"
source="https://download.gnome.org/sources/libmanette/${pkgver%.*}/libmanette-$pkgver.tar.xz"

build() {
	abuild-meson \
		-Dvapi=true \
		-Dintrospection=true \
		. output
	meson compile -C output
}

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

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

sha512sums="
0118ce0d97a73df26c6ea66a343ca40ec7d026100a3dc1dbbd66d57f6a49b073c59321ee1dbff162b832fec846b0722dce17b5a7fd6a9d3288e61d2b8a0609c0  libmanette-0.2.12.tar.xz
"
