# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=gnome-photos
pkgver=40.0
pkgrel=1
pkgdesc="Access, organize, and share your photos on GNOME"
arch=(x86_64)
url="https://wiki.gnome.org/Apps/Photos"
license=(GPL)
depends=(exempi gtk3 libexif librsvg babl gegl gsettings-desktop-schemas
         grilo-plugins lcms2 tracker3-miners geocode-glib grilo gfbgraph libgdata
         libgexiv2 libraw gnome-online-accounts dleyna-server dleyna-renderer
         libdazzle libhandy)
makedepends=(python yelp-tools git meson docbook-xsl)
groups=(gnome)
_commit=f642e495af7bc0c49c520eb1fb3bb245b6a6d9c1  # tags/40.0^0
source=("git+https://gitlab.gnome.org/GNOME/gnome-photos.git#commit=$_commit"
        "git+https://gitlab.gnome.org/GNOME/libgd.git")
sha256sums=('SKIP'
            'SKIP')

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

prepare() {
  cd $pkgname

  git submodule init
  git submodule set-url subprojects/libgd "$srcdir/libgd"
  git submodule update
}

build() {
  arch-meson $pkgname build -D manuals=true
  meson compile -C build
}

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