# Maintainer: Developer <dev@tuxcore.org>

pkgname=plasma-workspace
pkgver=%version%
_dirver=$(echo $pkgver | cut -d. -f1-3)
pkgrel=%release%
pkgdesc='KDE Plasma Workspace'
arch=(x86_64)
url='https://kde.org/plasma-desktop/'
license=(LGPL-2.0-or-later)
depends=(accountsservice
         appstream-qt
         dbus
         fontconfig
         freetype2
         gcc-libs
         glibc
         icu
         kactivitymanagerd
         karchive
         kauth
         kbookmarks
         kcmutils
         kcolorscheme
         kcompletion
         kconfig
         kconfigwidgets
         kcoreaddons
         kcrash
         kde-cli-tools
         kdeclarative
         kded
         kdbusaddons
         kglobalaccel
         kguiaddons
         kholidays
         ki18n
         kiconthemes
         kidletime
         kio
         kio-extras
         kio-fuse
         kirigami
         kirigami-addons
         kitemmodels
         kjobwidgets
         knewstuff
         knotifications
         knotifyconfig
         kpackage
         kparts
         kpipewire
         krunner
         kquickcharts
         kscreenlocker
         kservice
         kstatusnotifieritem
         ksvg
         ksystemstats
         ktexteditor
         ktextwidgets
         kunitconversion
         kuserfeedback
         kwallet
         kwayland
         kwidgetsaddons
         kwin
         kwindowsystem
         kxmlgui
         layer-shell-qt
         libcanberra
         libice
         libkexiv2
         libksysguard
         libplasma
         libqalculate
         libsm
         libx11
         libxau
         libxcb
         libxcrypt
         libxcursor
         libxfixes
         libxft
         libxtst
         milou
         ocean-sound-theme
         phonon-qt6
         plasma-activities
         plasma-activities-stats
         plasma5support
         prison
         qt6-5compat
         qt6-base
         qt6-declarative
         qt6-positioning
         qt6-svg
         qt6-tools # for qdbus
         qt6-virtualkeyboard
         qt6-wayland
         sh
         solid
         systemd-libs
         wayland
         xcb-util
         xcb-util-image
         xorg-xmessage
         xorg-xrdb
         xorg-xsetroot
         xorg-xwayland
         zlib)
# makedepends=(baloo
#              extra-cmake-modules
#              gpsd
#              kdoctools
#              kunitconversion
#              networkmanager-qt
#              plasma-wayland-protocols)
optdepends=('appmenu-gtk-module: global menu support for GTK2 and some GTK3 applications'
            'baloo: Baloo search runner'
            'discover: manage applications installation from the launcher'
            'gpsd: GPS based geolocation'
            'kdepim-addons: displaying PIM events in the calendar'
            'kwayland-integration: Wayland integration for Qt5 applications'
            'networkmanager-qt: IP based geolocation'
            'plasma-workspace-wallpapers: additional wallpapers'
            'plasma5-integration: use Plasma settings in Qt5 applications'
            'xdg-desktop-portal-gtk: sync font settings to Flatpak apps')
conflicts=(plasma-wayland-session)
replaces=(plasma-wayland-session)
groups=(plasma)
source=("$pkgname-$pkgver-$pkgrel.tar.gz"::"https://geo.mirror.pkgbuild.com/pool/packages/$pkgname-$pkgver-$pkgrel-x86_64.pkg.tar.zst")
sha256sums=('SKIP')


package() {
  depends+=(plasma-integration)
  
    # Set x11 to default
  mv $srcdir/usr/share/wayland-sessions/plasma.desktop $srcdir/usr/share/wayland-sessions/plasmawayland.desktop
  mv $srcdir/usr/share/xsessions/plasmax11.desktop $srcdir/usr/share/xsessions/plasma.desktop

  mkdir -p "$pkgdir"/usr
  mkdir -p "$pkgdir"/etc
    # Install
  cp -R $srcdir/*/ "$pkgdir"/
}
