# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=desktop-file-utils
pkgver=0.28
pkgrel=1
pkgdesc="Command line utilities for working with desktop entries"
url="https://www.freedesktop.org/wiki/Software/desktop-file-utils"
arch=(x86_64)
license=(GPL-2.0-or-later)
depends=(
  glib2
  glibc
)
makedepends=(
  git
  meson
)
source=(
  "git+https://gitlab.freedesktop.org/xdg/desktop-file-utils.git#tag=$pkgver"
  update-desktop-database.hook
)
b2sums=('de178fec8f5f22ea1b3f50473358cf7d4401e56cc9c27b603e9b58a04d937af3893a981a4ef3409bbb0b64320ff0e751f06f2db58e23b4375011d608a5d298d3'
        '2420bfc3deea04a7a00da36043408fb6c6a89d626a52dd47fef165c6aedf0c9c332b87ee3c497e1093f6e4972284614eb6e5e59c1a9d3229acfd755a6285037a')
validpgpkeys=(
  C01EDE5BB0D91E26D003662EC76BB9FEEAD12EA7 # Hans Petter Jansson <hpj@cl.no>
)

prepare() {
  cd $pkgname
}

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

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

package() {
  depends+=(libglib-2.0.so)

  meson install -C build --destdir "$pkgdir"
  install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 *.hook
}

# vim:set sw=2 sts=-1 et:
