# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Tobias Kieslich <tobias@justdreams.de>

pkgname=ghex
pkgver=3.18.4
pkgrel=2
pkgdesc="A simple binary editor for the Gnome desktop"
url="https://wiki.gnome.org/Apps/Ghex"
arch=(x86_64)
license=(GPL)
depends=(gtk3)
makedepends=(git meson yelp-tools)
groups=(gnome-extra)
_commit=228094e8d203ab62e49c33df2734fc9628c74775  # tags/3.18.4^0
source=("git+https://gitlab.gnome.org/GNOME/ghex.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd $pkgname
}

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

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

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