# Packager = Tuxcore <dev@tuxcore.org> 
pkgname=bluedevil
pkgver=6.1.1
_dirver=$(echo $pkgver | cut -d. -f1-3)
pkgrel=1
epoch=1
pkgdesc='Integrate the Bluetooth technology within KDE workspace and applications'
arch=(x86_64)
url='https://kde.org/plasma-desktop/'
license=(GPL-2.0-or-later)
depends=(bluez-qt
         gcc-libs
         glibc
         kcmutils
         kconfig
         kcoreaddons
         kdbusaddons
         kdeclarative
         ki18n
         kio
         kirigami
         kjobwidgets
         knotifications
         kservice
         ksvg
         kwidgetsaddons
         kwindowsystem
         libplasma
         qt6-base
         qt6-declarative)
makedepends=(extra-cmake-modules
             kdoctools)
optdepends=('bluez-obex: file transfer'
            'pulseaudio-bluetooth: to connect to A2DP profile')
groups=(plasma)
source=(https://download.kde.org/stable/plasma/$_dirver/$pkgname-$pkgver.tar.xz{,.sig})
sha256sums=('71b684b29b596c1c8b603a227ef8c9b30ae5174c270d5a20fdd4b4b6d872d7a0'
            'SKIP')
              '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
  cmake --build build
}

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