# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Ionut Biru <ibiru@archlinux.org>

pkgname=dconf
pkgver=0.34.0
pkgrel=1
pkgdesc="Configuration database system"
url="https://wiki.gnome.org/Projects/dconf"
arch=(x86_64)
license=(LGPL2.1)
depends=(glib2)
makedepends=(vala dbus git gtk-doc python meson bash-completion)
install=dconf.install
_commit=22d49c42cc71435e1ece14a385286e1d414ff21b  # tags/0.34.0^0
source=("git+https://gitlab.gnome.org/GNOME/dconf.git#commit=$_commit"
        dconf-update dconf-update.hook)
sha256sums=('SKIP'
            '330142605370f82f4229e8a94b245f911407eb629b50f1497f415c70164a90ec'
            '51b5c5570eac4792eb4a0efe820e3451b2019501855e57974fcd18986cf86977')

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

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D gtk_doc=true
  ninja -C build
}

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

package() {
  DESTDIR="$pkgdir" meson install -C build
  install -Dt "$pkgdir/usr/share/libalpm/hooks" -m644 *.hook
  install -Dt "$pkgdir/usr/share/libalpm/scripts" dconf-update
  install -Dm644 /dev/null "$pkgdir/etc/dconf/db/.placeholder"
}

# vim:set sw=2 et:
