# Maintainer: Llewelyn Trahaearn # Contributor: jdarch # Contributor: mareex pkgname=gnome-shell-extension-lockkeys-git pkgver=r130.328c44f pkgrel=1 pkgdesc="Lock key state indicator for GNOME Shell." arch=('any') url="https://github.com/kazysmaster/gnome-shell-extension-lockkeys" license=('GPL') depends=('gnome-shell' 'hicolor-icon-theme') makedepends=('git') provides=("${pkgname%-*}") conflicts=("${pkgname%-*}") source=("${pkgname%-*}::git+${url}") sha512sums=('SKIP') pkgver() { cd "${pkgname%-*}" ( set -o pipefail git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" ) } package() { # Locate the extension. cd "$(dirname $(find -name 'metadata.json' -print -quit))" _extname=$(grep -Po '(?<="uuid": ")[^"]*' metadata.json) _destdir="${pkgdir}/usr/share/gnome-shell/extensions/${_extname}" # Copy extension files into place. find -maxdepth 1 \( -iname '*.js*' -or -iname '*.css' -or -iname '*.ui' \) -exec install -Dm644 -t "${_destdir}" '{}' + find -maxdepth 2 \( -iname '*.svg*' \) -exec install -Dm644 -t "${_destdir}/icons" '{}' + find -name '*.xml' -exec install -Dm644 -t "${pkgdir}/usr/share/glib-2.0/schemas/" '{}' + cd locale for locale in */ do install -Dm644 -t "${pkgdir}/usr/share/locale/${locale}/LC_MESSAGES" "${locale}/LC_MESSAGES"/*.mo done }