# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=libgudev
pkgver=238
pkgrel=0
pkgdesc="GObject-based wrapper library for libudev"
url="https://wiki.gnome.org/Projects/libgudev"
arch="all"
license="LGPL-2.1-or-later"
depends_dev="eudev-dev"
makedepends="$depends_dev meson glib-dev gobject-introspection-dev vala"
subpackages="$pkgname-dev $pkgname-dbg"
source="https://download.gnome.org/sources/libgudev/$pkgver/libgudev-$pkgver.tar.xz"

build() {
	# Tests require testing/umockdev
	abuild-meson \
		-Dtests=disabled \
		-Dintrospection=enabled \
		-Dvapi=enabled \
		-Dgtk_doc=false \
		. output
	meson compile -C output
}

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

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

sha512sums="
684061b4fc64a6ea3dd1ac34835279330c7eb2728fad6e3a9d34c0d501be3103d0f96c6d6866c8e257a0027e4f78a6314cb8ba81cda5ddf42ee9ea1a576ec5dc  libgudev-238.tar.xz
"
