# Maintainer: Olivier Tilloy <otilloy@igalia.com>

pkgname=xdg-desktop-portal-holo
_commit=bb73298cd763e0ce131912e48c766a4032c9f910
pkgver=0.1.14.bb73298
pkgrel=5
pkgdesc='A backend implementation for xdg-desktop-portal of holo-specific interfaces'
url="https://gitlab.steamos.cloud/holo/$pkgname"
arch=('x86_64')
source=("git+ssh://git@gitlab.steamos.cloud/holo/$pkgname.git#commit=$_commit")
depends=('glib2')
makedepends=('fontconfig'
             'git'
             'glib2-devel'
             'python-packaging'
             'meson'
             'pkgconf'
             'systemd'
             'xdg-desktop-portal')
license=('LGPL-2.1-or-later')
sha256sums=('SKIP')
provides=('xdg-desktop-portal-impl')

# deckard CI doesn't support these, it keeps trying to build because the srcdir isn't checked out.

# pkgver() {
#   cd "$srcdir/$pkgname"
#   echo 0.1.$(git rev-list --count HEAD).$(git rev-parse --short HEAD)
# }

prepare() {
  cd "$pkgname"
}

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

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

