# Maintainer: Llewelyn Trahaearn pkgname=gnome-shell-extension-freon-git pkgver=17.r0.g08948e0 pkgrel=1 pkgdesc="Displays: CPU temperature, HDD/SSD temperature, video card temperature (nVidia/Catalyst), voltage and fan RPM in a GNOME Shell top bar pop-down." arch=('any') url="https://github.com/UshakovVasilii/gnome-shell-extension-freon" license=('GPL') depends=('dconf' 'gnome-shell' 'lm_sensors') makedepends=('git' 'gnome-common' 'intltool') optdepends=( 'udisks2: optional backend for storage temperature sensors.' 'hddtemp: optional backend for S.M.A.R.T. temperature sensors.' ) provides=("${pkgname%-*}") conflicts=("${pkgname%-*}" 'gnome-shell-extensions-git') install="gschemas.install" source=("${pkgname}::git+https://github.com/UshakovVasilii/gnome-shell-extension-freon.git") sha512sums=('SKIP') _branch=master pkgver() { cd "${srcdir}/${pkgname}" git checkout ${_branch} --quiet ( set -o pipefail git describe --long --tags 2>/dev/null | sed 's/^EGO.//;s/\([^-]*-g\)/r\1/;s/-/./g' || printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" ) } prepare() { cd "${srcdir}/${pkgname}" git checkout ${_branch} } 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/" '{}' + }