# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: Allan McRae <mcrae_allan@hotmail.com>
# Contributor: lp76 <l.peduto@gmail.com>

pkgname=gtk-vnc
pkgver=1.3.1
pkgrel=2
pkgdesc="VNC viewer widget for GTK"
url="https://wiki.gnome.org/Projects/gtk-vnc"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
license=(LGPL-2.1-or-later)
depends=(
  cairo
  gdk-pixbuf2
  glib2
  glibc
  gnutls
  gtk3
  libgcrypt
  libpulse
  libsasl
  libx11
  zlib
)
makedepends=(
  git
  glib2-devel
  gobject-introspection
  meson
  perl-text-csv
  vala
)
provides=(
  libgtk-vnc-2.0.so
  libgvnc{,pulse}-1.0.so
)
source=(
  "git+https://gitlab.gnome.org/GNOME/gtk-vnc.git?signed#tag=v$pkgver"
  "git+https://gitlab.com/keycodemap/keycodemapdb.git"
)
b2sums=('21b2a7862eacb48c089eda60aa526efc01175027a0d1a97c58a8e37e6e59286e582bf4d70e32b4f95c71f0cbcd736195175a2cadf21e4bf3ac1894393b2df567'
        'SKIP')
validpgpkeys=(
  DAF3A6FDB26B62912D0E8E3FBE86EBB415104FDF # Daniel P. Berrange <berrange@redhat.com
)

prepare() {
  cd gtk-vnc

  git submodule init
  git submodule set-url subprojects/keycodemapdb "$srcdir/keycodemapdb"
  git -c protocol.file.allow=always -c protocol.allow=never submodule update
}

build() {
  arch-meson gtk-vnc build
  meson compile -C build
}

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

package() {
  meson install -C build --destdir "$pkgdir"
  install -Dt "$pkgdir/usr/bin" build/examples/gvncviewer
}

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