# Packager = Tuxcore <dev@tuxcore.org> 
pkgbase=breeze
pkgname=(breeze
         breeze5)
pkgver=6.2.4
_dirver=$(echo $pkgver | cut -d. -f1-3)
pkgrel=1
arch=(x86_64)
pkgdesc='Artwork, styles and assets for the Breeze visual style for the Plasma Desktop'
url='https://kde.org/plasma-desktop/'
license=(LGPL-2.0-or-later)
depends=(breeze-icons
         frameworkintegration
         gcc-libs
         glibc
         kcmutils
         kcolorscheme
         kconfig
         kcoreaddons
         kdecoration
         kguiaddons
         ki18n
         kiconthemes
         kirigami
         kwidgetsaddons
         kwindowsystem
         qt6-base
         qt6-declarative)
makedepends=(extra-cmake-modules
             frameworkintegration5
             kconfigwidgets5
             kiconthemes5
             kirigami2
             kwindowsystem5)
optdepends=('breeze-gtk: Breeze widget style for GTK applications'
            'breeze5: Breeze widget style for Qt5 applications')
groups=(plasma)
source=(https://download.kde.org/stable/plasma/$_dirver/$pkgname-$pkgver.tar.xz{,.sig})
sha256sums=('4d9613896082f336413abb24ef8f8d86513f7e99a4c0bcdf2f45cd7c5bbd7c20'
            '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_QT5=OFF
  cmake --build build

  cmake -B build5 -S $pkgname-$pkgver \
    -DBUILD_TESTING=OFF \
    -DBUILD_QT6=OFF
  cmake --build build5
}

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

package_breeze5() {
  pkgdesc='Qt5 Breeze style'
  depends=(breeze
           breeze-icons
           gcc-libs
           glibc
           frameworkintegration5
           kconfig5
           kconfigwidgets5
           kguiaddons5
           kiconthemes5
           kirigami2
           kwindowsystem5
           qt5-base
           qt5-declarative)
  conflicts=('breeze<5.27.80')
  replaces=('breeze<5.27.80')
  optdepends=()
  groups=()

  DESTDIR="$pkgdir" cmake --install build5
  rm -r "$pkgdir"/usr/share
}
