summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 844bab576a74b5847d403ec6c3d90fa6f676b2da (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
# Maintainer : MorsMortium <morsmortium@disroot.org>

_pkgname=blender-breezedark-theme
pkgname=${_pkgname}-git
pkgver=r19.0e49f3d
pkgrel=1
pkgdesc='A Blender theme that mimics the color scheme of the Breeze Dark KDE theme'
arch=('any')
url="https://codeberg.org/Nesakko/${_pkgname}"
license=('Unlicense')
depends=('blender')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
makedepends=('git')
sha512sums=('SKIP')
source=("${pkgname}::git+${url}.git")

pkgver() {
  cd "${srcdir}/${pkgname}"
  printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}

package() {
  cd "${srcdir}/${pkgname}"

  for Location in "/usr/share/blender/" "/opt/upbge/"; do
    if [ -d $Location ]; then
      Directories=`ls -d $Location*/`
      while IFS= read -r Directory; do
        if [[ $Directory =~ [0-9] ]]; then
          mkdir -p ${pkgdir}$Directory/scripts/presets/interface_theme
          install -Dm 644 ./breeze_dark.xml ${pkgdir}$Directory/scripts/presets/interface_theme/Breeze_Dark.xml
        fi
      done <<< "$Directories"
    fi
  done
}