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

pkgname=libgudev
pkgver=237
pkgrel=02
pkgdesc="GObject bindings for libudev"
url="https://wiki.gnome.org/Projects/libgudev"
arch=(x86_64)
depends=(glib2)
makedepends=(gobject-introspection gtk-doc git meson umockdev vala)
_commit=dff7a794e55d6ad7a10e8edacd73aa047593e74c  # tags/237^0
source=("git+https://gitlab.gnome.org/GNOME/libgudev.git#commit=$_commit")

pkgver() {
  cd libgudev
  git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}

prepare() {
  cd libgudev

  # Use a locale with "," decimal separator that we
  # actually have available in the build environments
  sed -e 's/fr_FR\.UTF-8/de_DE.UTF-8/g' \
      -i tests/meson.build tests/test-double.c
}

build() {
  arch-meson libgudev build -D gtk_doc=true
  meson compile -C build
}

#check() {
#  meson test -C build --print-errorlogs
#}

package() {
  depends+=(libg{lib,object}-2.0.so libudev.so)
  provides+=(libgudev-1.0.so)

  meson install -C build --destdir "$pkgdir"
}

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

license=(LGPL2.1)

sha256sums=(SKIP)



