# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>

pkgname=plasma-framework
_pkgver=5.27.80
# fake version number to bypass conflicts with KF5
pkgver=6.alpha.$_pkgver
_dirver=$(echo $_pkgver | cut -d. -f1-3)
pkgrel=1
pkgdesc='Plasma library and runtime components'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url='https://kde.org/plasma-desktop/'
license=(LGPL)
depends=(gcc-libs
         glibc
         kactivities
         kcmutils
         kcolorscheme
         kconfig
         kcoreaddons
         kglobalaccel
         ki18n
         kiconthemes
         kio
         kirigami
         knotifications
         kpackage
         ksvg
         kwidgetsaddons
         kwindowsystem
         libglvnd
         libx11
         libxcb
         qt6-base
         qt6-declarative
         qt6-wayland
         wayland)
makedepends=(doxygen
             extra-cmake-modules
             kdoctools
             plasma-wayland-protocols
             qt6-doc
             qt6-tools)
groups=(plasma)
source=(https://download.kde.org/unstable/plasma/$_dirver/$pkgname-$_pkgver.tar.xz{,.sig})
sha256sums=('48e6d43bf293e33394b71f6c2057056934733d4d62e4039b3e091b793b6f0e7d'
            'SKIP')
validpgpkeys=('E0A3EB202F8E57528E13E72FD7574483BB57B18D'  # Jonathan Esk-Riddell <jr@jriddell.org>
              '0AAC775BB6437A8D9AF7A3ACFE0784117FBCE11D'  # Bhushan Shah <bshah@kde.org>
              'D07BD8662C56CB291B316EB2F5675605C74E02CF'  # David Edmundson <davidedmundson@kde.org>
              '1FA881591C26B276D7A5518EEAAF29B42A678C20') # Marco Martin <notmart@gmail.com>

build() {
  cmake -B build  -S $pkgname-$_pkgver \
    -DBUILD_TESTING=OFF \
    -DBUILD_QCH=ON
  cmake --build build
}

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