summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6de4fc6dea8ffd49f67e8097e36a8014c980f52f (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-notification-timeout-git
pkgver=r24.0864608
pkgrel=1
pkgdesc="Gnome Shell extension for configuring notification timeout."
arch=("any")
url="https://github.com/vchlum/notification-timeout"
license=("MIT")
depends=("gnome-shell")
makedepends=("git")
provides=("gnome-shell-extension-notification-timeout")
conflicts=("gnome-shell-extension-notification-timeout")
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/extension"
  local _uuid=$(grep -Po '(?<="uuid": ")[^"]*' metadata.json)
  find -regextype posix-egrep -regex ".*\.(js|json)$" -exec install -Dm644 {} ${pkgdir}/usr/share/gnome-shell/extensions/${_uuid}/{} \;

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