summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 39239eaf6d5d290b9ceef5ca8d9830829500b4c4 (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
# Maintainer: Mark Wagie <mark dot wagie at proton dot me>
pkgname=gnome-shell-extension-gradia-capture-git
pkgver=r35.f545fde
pkgrel=1
pkgdesc="Enhances the GNOME built-in screenshot tool with the annotation features you would expect."
arch=('any')
url="https://github.com/AlexanderVanhee/gradia-capture"
license=('GPL-3.0-or-later')
depends=(
  'gnome-shell'
  'gradia'
)
makedepends=(
  'git'
  'jq'
)
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=('git+https://github.com/AlexanderVanhee/gradia-capture.git')
sha256sums=('SKIP')

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

build() {
  cd gradia-capture
  gnome-extensions pack src \
    $(find src -maxdepth 1 -name '*.js' -printf '--extra-source=%f ') \
    --extra-source=../icons/ \
    --force
}

package() {
  cd gradia-capture
  _uuid=$(jq -r .uuid src/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

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