# Maintainer: Karim <karim@gabrielevarano.ch>
#
# tanin-icons — Fuji-accent icon themes. Thin overlays that inherit Adwaita and
# recolour only the folder/place icons to each Fuji hue (Ume/Shinkai/Take/
# Chikyū/Beni). App-icon coverage stays exactly Adwaita's; only "containers"
# (folders, user dirs, network) follow the accent.
#
# The accent picker (taninux.gui.style) switches the GNOME icon-theme gsetting
# to Tanin-<accent>, so folders recolour live when you change the accent.
#
# Regenerate after an adwaita-icon-theme bump: rebuild this package (it reads
# /usr/share/icons/Adwaita at build time).
pkgname=tanin-icons
pkgver=0.1.0
pkgrel=1
pkgdesc="TANINUX Fuji-accent icon themes — Adwaita with folders recoloured per accent"
arch=('any')
url="https://taninux.kgva.ch"
license=('GPL-3.0-or-later')
depends=('adwaita-icon-theme')
makedepends=('librsvg' 'python')        # rsvg-convert for the 16px raster
install=tanin-icons.install

build() {
  cd "$startdir"
  OUT_DIR="$srcdir/out" python recolor.py
}

package() {
  install -d "$pkgdir/usr/share/icons"
  cp -r "$srcdir/out/"Tanin-* "$pkgdir/usr/share/icons/"
  # normalise perms (cp can carry build-user bits)
  find "$pkgdir/usr/share/icons" -type d -exec chmod 755 {} +
  find "$pkgdir/usr/share/icons" -type f -exec chmod 644 {} +
}
