#!/bin/mkpkg
# description: GTK client library and spicy client for SPICE
# url: https://www.spice-space.org

name=spice-gtk
version=0.42
release=1
depends=(glib gtk3 spice spice-protocol cairo gdk-pixbuf pixman opus lz4 libjpeg-turbo libressl json-glib gstreamer gst-plugins-base)
makedeps=(meson samurai pkgconf python3 perl py-pyparsing py-six)
source=(https://www.spice-space.org/download/gtk/$name-$version.tar.xz
        spice-gtk-lld.patch)
sha256sums=(
    "9380117f1811ad1faa1812cb6602479b6290d4a0d8cc442d44427f7f6c0e7a58"
    "3b392e44d5f9257f1a1b3411d6e2c3b21dec48934cabc5c312ea43411ccef49d"
)


patch() {
    cd $name-$version
    patch -p1 < ${SRC}/spice-gtk-lld.patch
}

build() {
    cd $name-$version
    meson setup build \
     --prefix=/usr \
     --buildtype=release \
     --wrap-mode=nodownload \
     -Dauto_features=disabled \
     -Dwayland-protocols=enabled \
     -Dgtk=enabled \
     -Dintrospection=disabled \
     -Dbuiltin-mjpeg=false \
     -Dvapi=disabled \
     -Dgtk_doc=disabled \
     -Dopus=enabled \
     -Dwebdav=disabled \
     -Dusbredir=disabled \
     -Dcoroutine=gthread
    meson compile -C build
    meson install -C build --destdir $PKG
}
signify() {
    untrusted comment: public key
    RWTZ9IduCSQ/mL8337TEUinPwT92xFEUpD92hkS7IxcOnzTt9QdpohT3
}

# vim: filetype=sh
