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

pkgname=gnome-settings-daemon
pkgver=49.1
pkgrel=1
pkgdesc="GNOME Settings Daemon"
url="https://gitlab.gnome.org/GNOME/gnome-settings-daemon"
arch=(x86_64 aarch64)
license=(
  GPL-2.0-or-later
  LGPL-2.0-or-later
)
depends=(
  alsa-lib
  bash
  dconf
  fontconfig
  gcc-libs
  gcr-4
  geoclue
  geocode-glib-2
  glib2
  glibc
  gnome-desktop-4
  gsettings-desktop-schemas
  gtk4
  libcanberra-pulse
  libcolord
  libcups
  libgudev
  libgweather-4
  libmm-glib
  libnm
  libnotify
  libp11-kit
  libpulse
  libx11
  libxfixes
  polkit
  pulse-native-provider
  systemd-libs
  upower
)
makedepends=(
  docbook-xsl
  git
  glib2-devel
  libxslt
  meson
  python
  usbguard
)
checkdepends=(
  python-dbusmock
  python-gobject
)
optdepends=('usbguard: USB protection support')
groups=(gnome)
backup=(etc/xdg/Xwayland-session.d/00-xrdb)
source=(
  "git+https://gitlab.gnome.org/GNOME/gnome-settings-daemon.git#tag=${pkgver/[a-z]/.&}"
  "git+https://gitlab.gnome.org/GNOME/libgnome-volume-control.git"
)
b2sums=('c01ce2ae345dd75f6df255e4802ee608b56fbc9554e6f38fb36bda49600d80623fe90cc05b7f77aa810505a28837d3ee6a5718d30a947730f2adf68e0830e39b'
        'SKIP')

prepare() {
  cd $pkgname

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

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

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

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

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