summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f561d23926ae234c8657a0625295e9e8443090ba (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
# Maintainer: ArcanusNEO <admin@transcliff.top>
pkgname=gnome-shell-extension-ibus-switcher-git
pkgver=r5.20e8280
pkgrel=1
pkgdesc="A gnome shell extension to use d-bus to switch ibus source."
arch=("any")
url="https://github.com/kevinhwang91/gnome-shell-ibus-switcher"
license=("MIT")
depends=("gnome-shell")
makedepends=("git")
provides=("gnome-shell-extension-ibus-switcher")
conflicts=("gnome-shell-extension-ibus-switcher")
source=("$pkgname::git+$url")
md5sums=("SKIP")

pkgver() {
  cd "$srcdir/$pkgname"
  echo "r$(git rev-list --count HEAD).$(git rev-parse --short HEAD)"
}

package() {
  cd "$srcdir/$pkgname"
  local _uuid=$(grep -Po '(?<="uuid": ")[^"]*' metadata.json)
  sed -i 's/"version": [[:digit:]][[:digit:]]*/"version": '"$(git rev-list --count HEAD)"'/' metadata.json;
  find . -regextype posix-egrep -regex ".*\.(js|json)$" -exec install -Dm644 {} ${pkgdir}/usr/share/gnome-shell/extensions/${_uuid}/{} \;

  #cd "$srcdir/$pkgname/schemas"
  #find . -regextype posix-egrep -regex ".*\.gschema\.xml$" -exec install -Dm644 {} ${pkgdir}/usr/share/glib-2.0/schemas/{} \;
}