# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>

pkgbase=oxygen-icons
pkgname=(oxygen-icons oxygen-icons-svg)
pkgver=5.86.0
epoch=1
pkgrel=1
pkgdesc='The Oxygen Icon Theme'
arch=(any)
url='https://community.kde.org/Frameworks'
license=(LGPL)
makedepends=(extra-cmake-modules qt5-base)
source=(https://download.kde.org/stable/frameworks/${pkgver%.*}/${pkgbase}5-$pkgver.tar.xz{,.sig})
sha256sums=('a2acd0ae5fde26f4d9ac32c0e18ec48f99b881e91e35adfc75a0b01ab8e1f6d1'
            'SKIP')
validpgpkeys=(53E6B47B45CEA3E0D5B7457758D0EE648A48B3BB) # David Faure <faure@kde.org>

build() {
  cmake -B build -S ${pkgbase}5-$pkgver
  cmake --build build
}

package_oxygen-icons() {
  groups=(kf5)

  DESTDIR="$pkgdir" cmake --install build
}

package_oxygen-icons-svg() {
  pkgdesc='The Oxygen Icon Theme (Scalable Vector Graphics)'

  cd ${pkgbase}5-$pkgver
  find scalable -type f ! -name '*.sh' -exec \
    install -D -m644 "{}" "$pkgdir"/usr/share/icons/oxygen/{} \;
}
