summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ca959ea90f8a4cd732b9fc39c89edb19b38a6e65 (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
45
46
47
# Maintainer: Mingi Sung <sungmg@saltyming.net>

pkgname=gnome-shell-extension-custom-hot-corners-extended-git
_pkgname=custom-hot-corners-extended
pkgver=29.r27.g7d67af6
pkgrel=1
pkgdesc="A GNOME Shell Extension that allows you to use corners and edges as triggers for various actions - git"
arch=('any')
url="https://github.com/G-dH/custom-hot-corners-extended"
license=('GPL3')
makedepends=('git')
depends=('gnome-shell')
provides=('gnome-shell-extension-custom-hot-corners-extended')
conflicts=('gnome-shell-extension-custom-hot-corners-extended')
source=("$_pkgname::git+$url")
sha256sums=('SKIP')

pkgver() {
  cd "${_pkgname}"
  git describe --tags | sed 's/[^-]*-g/r&/;s/Ext.v*//;s/-/./g'
}

build() {
  cd "${_pkgname}"
  make all
}

package() {
  cd "${_pkgname}"
  local _uuid=$(grep -Po '(?<="uuid": ")[^"]*' metadata.json)
  local _destdir="${pkgdir}/usr/share/gnome-shell/extensions/${_uuid}"

  install -Dm644 -t "${_destdir}" metadata.json *.js
  for i in src/*
    do
      install -Dm644 -t "${_destdir}/${i}" ${i}/*
    done
  install -Dm644 -t "${_destdir}/resources" resources/*.gresource
  install -Dm644 -t "${pkgdir}/usr/share/glib-2.0/schemas/" schemas/*.xml
  install -Dm644 -t "${pkgdir}/usr/share/licenses/${pkgname}" LICENSE

  cd locale
  for locale in */
    do
      install -Dm644 -t "${pkgdir}/usr/share/locale/${locale}/LC_MESSAGES" "${locale}/LC_MESSAGES"/*.mo
    done
}