summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 027d8caba284f0cc0c74c210593252cf6d02cef5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# Maintainer: Joan Bruguera Micó <joanbrugueram@gmail.com>
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Maintainer: Brett Cornwall <ainola@archlinux.org>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Stefano Facchini <stefano.facchini@gmail.com>
# Contributor: Jonathan Lestrelin <zanko@daemontux.org>
# Contributor: Lucio Zara <pennega@gmail.com>

pkgname=spice-gtk
pkgver=0.39
pkgrel=4
pkgdesc="GTK+ client library for SPICE"
arch=('x86_64')
url="https://www.spice-space.org/"
license=('LGPL2.1')
depends=(
    'gst-plugins-base'
    'gst-plugins-good'
    'libcacard'
    'libgtk-3.so'
    'libjpeg.so'
    'libopus.so'
    'phodav'
    'polkit'
    'usbredir'
)
makedepends=(
    'gobject-introspection'
    'meson'
    'spice-protocol'
    'usbutils'
    'vala'
    'wayland-protocols'
)
provides=("spice-glib=$pkgver" "spice-gtk3=$pkgver")
replaces=('spice-glib' 'spice-gtk3')
source=("https://www.spice-space.org/download/gtk/$pkgname-$pkgver.tar.xz"{,.sig})
install=spice-gtk.install
sha256sums=('23acbee197eaaec9bce6e6bfd885bd8f79708332639243ff04833020865713cd'
            'SKIP')
validpgpkeys=('206D3B352F566F3B0E6572E997D9123DE37A484F') # Victor Toso de Carvalho <me@victortoso.com>

build() {
  arch-meson $pkgname-$pkgver build
  ninja -C build
}

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

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

# Support for extra mouse buttons (typically "Back" and "Forward" in e.g. Firefox) by Kevin Pouget:
# https://lists.freedesktop.org/archives/spice-devel/2020-May/051651.html
# His patches have been rebased on top of this commit to spice-protocol:
# https://gitlab.freedesktop.org/spice/spice-protocol/-/commit/cbe7b2c28543f4c5e57d1db1b753b73a64104162
provides+=(spice-gtk)
conflicts+=(spice-gtk)

source+=("spice-extra-mouse-buttons.patch")
sha256sums+=('3f5129e56b5816d5e5ce0a3cc2e875cc175f1be88eed6495cc1b85b1068bcf4a')

_pkgname=$pkgname
pkgname+="-extra-mouse-buttons"
pkgrel="$pkgrel.4"
pkgdesc+=" (with support for extra mouse buttons)"
eval "$(declare -f build | sed 's/$pkgname/$_pkgname/g')"

prepare() {
  echo '******************************' 1>&2
  echo '* THIS PACKAGE IS DEPRECATED *' 1>&2
  echo '******************************' 1>&2
  echo 'Side mouse buttons are now supported on the official Arch spice-gtk package.' 1>&2
  echo "Please replace $pkgname with $_pkgname." 1>&2
  echo 'This AUR package will be deleted soon.' 1>&2
  exit 1

  patch -d"$_pkgname-$pkgver" -Np1 -i "${srcdir}"/spice-extra-mouse-buttons.patch
}