summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: cb0ff53eb72ec9a9072fe54914ef70b0e13c0d5e (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=gnome-shell-extension-auto-accent-color
pkgver=21
pkgrel=1
pkgdesc="GNOME extension to automatically change the desktop accent colour based on the user's wallpaper."
arch=('any')
url="https://codeberg.org/Wartybix/GNOME-Auto-Accent-Colour"
license=('GPL-3.0-or-later')
depends=('gnome-shell')
makedepends=(
  'git'
  'jq'
)
provides=('gnome-shell-extension-auto-accent-colour')
source=("git+https://codeberg.org/Wartybix/GNOME-Auto-Accent-Colour.git#tag=$pkgver")
sha256sums=('91387a74bcad38b9ec3b01258a73cf35ffe404ef6f13319a15cb9c76adaffe13')

build() {
  cd GNOME-Auto-Accent-Colour
  gnome-extensions pack \
    --extra-source=color-thief/ \
    --extra-source=icons/ \
    --extra-source=cache.js \
    --extra-source=utils.js \
    --force
}

package() {
  cd GNOME-Auto-Accent-Colour
  _uuid=$(jq -r .uuid metadata.json)

  install -d "$pkgdir/usr/share/gnome-shell/extensions/${_uuid}"
  bsdtar -xvf "${_uuid}.shell-extension.zip" -C \
    "$pkgdir/usr/share/gnome-shell/extensions/${_uuid}/" --no-same-owner

  mv -v "$pkgdir/usr/share/gnome-shell/extensions/${_uuid}/locale" "$pkgdir/usr/share"

  install -Dvm644 schemas/*.gschema.xml -t "$pkgdir/usr/share/glib-2.0/schemas/"

  rm -rv "$pkgdir/usr/share/gnome-shell/extensions/${_uuid}/schemas/"
}