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

pkgname=gnome-characters
pkgver=40.0
pkgrel=1
pkgdesc="A character map application"
arch=(x86_64)
url="https://gitlab.gnome.org/GNOME/gnome-characters"
license=(GPL2)
depends=(gjs gtk3 libunistring gnome-desktop emoji-font libhandy)
makedepends=(meson gobject-introspection appstream-glib git gperf)
groups=(gnome)
_commit=8fde0572d3eaa19166ec139ef4f2c1d168404e95  # tags/40.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-characters.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build
  meson compile -C build
}

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

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