# Maintainer: FWS
# The version file is the single source of truth for releases, so the package
# version follows it instead of being duplicated here.
pkgname=fws-deskmanager
pkgver=$(tr -d '[:space:]' < version)
pkgrel=1
pkgdesc="Switch desktop environments on Arch Linux without rebooting"
arch=('x86_64')
url="https://gitea.nocode-var.tech/FWS/FWS-DeskManger"
license=('unknown')
depends=('gtk4' 'systemd' 'polkit')
makedepends=('cmake' 'pkgconf')
# Release packages only: the debug split package has no use for end users.
options=('!debug')
source=("$pkgname-$pkgver.tar.gz")
sha256sums=('SKIP')

build() {
  cmake -S "$pkgname-$pkgver" -B build \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr
  cmake --build build -j"$(nproc)"
}

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