File PKGBUILD of Package wf-shell

# Maintainer: Yukari Chiba <[email protected]>

pkgname=wf-shell
pkgver=0.11.0
pkgrel=1
pkgdesc='GTK3-based panel for the Wayfire compositor'
url=https://wayfire.org
arch=(x86_64 aarch64 riscv64 loongarch64)
license=(MIT)
depends=(wf-config gtkmm gtk4-layer-shell libdbusmenu-glib libwireplumber libpulse alsa-lib wlroots0.20)
makedepends=(wayland wayfire wayland-protocols meson ninja git gobject-introspection glib2 glm wlroots0.20-devel)

source=(
  "${pkgname}::git+https://github.com/WayfireWM/wf-shell#tag=v$pkgver"
  git+https://gitlab.gnome.org/GNOME/libgnome-volume-control.git
  git+https://github.com/soreau/wayland-logout.git
  git+https://github.com/WayfireWM/wf-json.git
)
sha512sums=(
  'd8c19cc4828361c931cbcec529de539f00f8d248b13d64d10b3e2debddd4587a8bf6ad5ee388b630f4e512a5ad98638bb9df0fb9d96f75d81d28584935f237d4'
  'SKIP' 'SKIP' 'SKIP')

prepare() {
  cd $pkgname

  git submodule init
  git config submodule.subprojects/wlroots.update none
  git config submodule.subprojects/gtk4-layer-shell.update none
  git submodule set-url subprojects/gvc "$srcdir/libgnome-volume-control"
  git submodule set-url subprojects/wayland-logout "$srcdir/wayland-logout"
  git submodule set-url subprojects/wf-json "$srcdir/wf-json"
  git -c protocol.file.allow=always submodule update
}

build () {
  ewe-meson "${pkgname}" build -D ddcutil=disabled
  meson compile -C build
}

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

package () {
  meson install -C build --destdir "$pkgdir"
  cd "${pkgname}"
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}