# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan De Groot <jgc@archlinux.org>

pkgname=gucharmap
pkgver=13.0.8
pkgrel=1
pkgdesc="Gnome Unicode Charmap"
url="https://wiki.gnome.org/Apps/Gucharmap"
arch=(x86_64)
license=(GPL)
depends=(dconf gtk3)
makedepends=(gtk-doc gobject-introspection yelp-tools appdata-tools git meson
             unicode-character-database unzip vala)
provides=(libgucharmap_2_90.so)
_commit=cdbc989f552833ea4ac0f8fefd095ebf6d61333e  # tags/13.0.8^0
source=("git+https://gitlab.gnome.org/GNOME/gucharmap.git#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D ucd_path=/usr/share/unicode
  meson compile -C build
}

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

package() {
  meson install -C build --destdir "$pkgdir"
}
