# Maintainer: "Amhairghin" Oscar Garcia Amor (https://ogarcia.me) _themes=(standard black blue brown green grey orange pink purple red yellow manjaro ubuntu dracula nord) _pkgbase='tela-circle-icon-theme' pkgbase="${_pkgbase}-spl-git" _pkgname=("${_themes[@]/#/${_pkgbase}-}") pkgname=(${_pkgbase}-all-git ${_pkgname[@]/%/-git}) pkgdesc='A flat colorful design icon theme' pkgver=2024.04.19.r6.ge88833b9 pkgrel=1 url="https://github.com/vinceliuice/${_pkgbase^}" arch=('any') license=('GPL3') makedepends=('git') depends=('hicolor-icon-theme') optdepends=('adwaita-icon-theme: for better GNOME integration' 'breeze-icons: for better KDE integration') provides=("${_pkgbase}") options=(!strip !debug) source=("${_pkgbase}::git+${url}.git") b2sums=('SKIP') pkgver() { cd "${_pkgbase}" git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g' } package_tela-circle-icon-theme-all-git() { pkgdesc="${pkgdesc} (all variants)" depends=(${_pkgname[@]/%/-git}) conflicts=(${_pkgbase}-all) } _package() { # The icon cache is generated by a pacman hook, so it can be regenerated when 'gtk-update-icon-cache' is updated, # and shouldn't be part of the package itself. Other icon packages like 'hicolor-icon-theme' and 'adwaita-icon-theme' # does things this way. # See https://gitlab.archlinux.org/archlinux/packaging/packages/gtk4/-/blob/main/gtk-update-icon-cache.hook gtk-update-icon-cache() { true } export -f gtk-update-icon-cache cd "${_pkgbase}" install -dm755 "${pkgdir}/usr/share/icons" ./install.sh -d "${pkgdir}/usr/share/icons" "${1}" } for _theme in "${_themes[@]}"; do eval "package_${_pkgbase}-${_theme}-git() { pkgdesc='${pkgdesc} (${_theme} variant)' conflicts=(${_pkgbase}-${_theme}) _package '${_theme}' }" done