summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 54f05df107237f2e44069a6d4f1b1bd759d9f724 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Maintainer: "Amhairghin" Oscar Garcia Amor (https://ogarcia.me)
# Maintainer: Tiago "Marmita" de Paula <tiagodepalves@gmail.com>

_themes=(standard black blue brown green grey orange pink purple red yellow manjaro ubuntu dracula nord)

pkgbase=tela-circle-icon-theme
pkgname=(${pkgbase}-all ${_themes[@]/#/${pkgbase}-})
pkgdesc='A flat colorful design icon theme'
pkgver=2024.04.19
pkgrel=2
url="https://github.com/vinceliuice/${pkgbase^}"
arch=('any')
license=('GPL3')
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}-${pkgver}.tar.gz::${url}/archive/${pkgver//./-}.tar.gz")
b2sums=('5bfafee284d0efaee5088adbdb5f6f4e93345ae031679f9b71e0b996472700225b26407246ddf8c74f9e92e74b311691233baf4fd33c5e005dc88f017c52b46c')

package_tela-circle-icon-theme-all() {
  pkgdesc="${pkgdesc} (all variants)"
  depends=("${_themes[@]/#/${pkgbase}-}")
}

_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^}-${pkgver//./-}"
  install -dm755 "${pkgdir}/usr/share/icons"
  ./install.sh -d "${pkgdir}/usr/share/icons" "${1}"
}

for _theme in "${_themes[@]}"; do
  eval "package_${pkgbase}-${_theme}() {
    pkgdesc='${pkgdesc} (${_theme} variant)'

    _package '${_theme}'
  }"
done