# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer:Antonio Rojas <arojas@archlinux.org>

pkgname=drkonqi
pkgver=6.3.1
_dirver=$(echo $pkgver | cut -d. -f1-3)
pkgrel=1
pkgdesc='The KDE crash handler'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url='https://kde.org/plasma-desktop/'
license=(GPL-2.0-or-later)
depends=(gcc-libs
         gdb
         glibc
         kcmutils
         kconfig
         kcoreaddons
         kcrash
         ki18n
         kidletime
         kio
         kirigami
         kitemmodels
         knotifications
         kservice
         kstatusnotifieritem
         kwallet
         kwidgetsaddons
         kwindowsystem
         polkit-qt6
         python
         python-psutil
         python-pygdbmi
         python-sentry_sdk
         qt6-base
         qt6-declarative
         syntax-highlighting
         systemd-libs)
makedepends=(extra-cmake-modules)
groups=(plasma)
source=(https://download.kde.org/stable/plasma/$_dirver/$pkgname-$pkgver.tar.xz{,.sig})
sha256sums=('d35b2eafa8f36e8809c47acc961e1be4f85348b655178c24cd72dc9126d68f97'
            '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 \
    -DCMAKE_INSTALL_LIBEXECDIR=lib \
    -DBUILD_TESTING=OFF \
    -DWITH_GDB12=ON \
    -DWITH_PYTHON_VENDORING=OFF
  cmake --build build
}

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