# Maintainer: Celestia Ludenberg <ash8820@proton.me>

pkgname=antergos-plasma-theme
pkgver=1
pkgrel=3
pkgdesc='Antergos NeXT Plasma desktop theme, look-and-feel, and splash screen'
arch=('any')
url="https://github.com/Antergos-NeXT/antergos-packages"
license=('GPL')
depends=('plasma-desktop' 'antergos-wallpapers')
groups=('antergos-branding' 'antergos-style')
optdepends=('qt5ct' 'qt6ct')
source=(
  "antergos-dark-colors"
  "antergos-dark-metadata.json"
  "antergos-dark-plasmarc"
  "antergos-dark-start.svgz"
  "antergosdark-desktop-metadata.json"
  "antergosdark-desktop-defaults"
  "antergosdark-desktop-layout.js"
  "antergosdark-desktop-splash.qml"
  "antergosdark-desktop-plasmoidsetupscript-kickoff.js"
  "start-here-kde-antergos.svg"
  "preview.png"
)
sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')

package() {
  # Plasma Desktop Theme
  install -dm755 "${pkgdir}/usr/share/plasma/desktoptheme/antergos-dark"
  install -m644 "${srcdir}/antergos-dark-colors" "${pkgdir}/usr/share/plasma/desktoptheme/antergos-dark/colors"
  install -m644 "${srcdir}/antergos-dark-metadata.json" "${pkgdir}/usr/share/plasma/desktoptheme/antergos-dark/metadata.json"
  install -m644 "${srcdir}/antergos-dark-plasmarc" "${pkgdir}/usr/share/plasma/desktoptheme/antergos-dark/plasmarc"
  install -dm755 "${pkgdir}/usr/share/plasma/desktoptheme/antergos-dark/icons"
  install -m644 "${srcdir}/antergos-dark-start.svgz" "${pkgdir}/usr/share/plasma/desktoptheme/antergos-dark/icons/start.svgz"

  # Look-and-Feel
  install -dm755 "${pkgdir}/usr/share/plasma/look-and-feel/antergosdark.desktop"
  install -m644 "${srcdir}/antergosdark-desktop-metadata.json" "${pkgdir}/usr/share/plasma/look-and-feel/antergosdark.desktop/metadata.json"
  install -dm755 "${pkgdir}/usr/share/plasma/look-and-feel/antergosdark.desktop/contents"
  install -m644 "${srcdir}/antergosdark-desktop-defaults" "${pkgdir}/usr/share/plasma/look-and-feel/antergosdark.desktop/contents/defaults"
  install -dm755 "${pkgdir}/usr/share/plasma/look-and-feel/antergosdark.desktop/contents/layouts"
  install -m644 "${srcdir}/antergosdark-desktop-layout.js" "${pkgdir}/usr/share/plasma/look-and-feel/antergosdark.desktop/contents/layouts/org.kde.plasma.desktop-layout.js"
  install -dm755 "${pkgdir}/usr/share/plasma/look-and-feel/antergosdark.desktop/contents/splash"
  install -m644 "${srcdir}/antergosdark-desktop-splash.qml" "${pkgdir}/usr/share/plasma/look-and-feel/antergosdark.desktop/contents/splash/Splash.qml"
  install -dm755 "${pkgdir}/usr/share/plasma/look-and-feel/antergosdark.desktop/contents/plasmoidsetupscripts"
  install -m644 "${srcdir}/antergosdark-desktop-plasmoidsetupscript-kickoff.js" "${pkgdir}/usr/share/plasma/look-and-feel/antergosdark.desktop/contents/plasmoidsetupscripts/org.kde.plasma.kickoff.js"
  install -dm755 "${pkgdir}/usr/share/plasma/look-and-feel/antergosdark.desktop/contents/previews"
  install -m644 "${srcdir}/preview.png" "${pkgdir}/usr/share/plasma/look-and-feel/antergosdark.desktop/contents/previews/preview.png"

  # Start menu icon for icon theme
  install -dm755 "${pkgdir}/usr/share/icons/hicolor/scalable/places"
  install -m644 "${srcdir}/start-here-kde-antergos.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/places/start-here-kde-antergos.svg"

  # Override breeze-dark start-here-kde icons so kickoff resolves to Antergos logo
  for size in 16 22 24 32 64 96; do
    install -dm755 "${pkgdir}/usr/share/icons/breeze-dark/places/${size}"
    install -m644 "${srcdir}/start-here-kde-antergos.svg" "${pkgdir}/usr/share/icons/breeze-dark/places/${size}/start-here-kde.svg"
  done
}
