blob: a5f3160c8f6cc2500799ffc5a9228ede4ec9c86d (
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
|
# Maintainer: Llewelyn Trahaearn <WoefulDerelict at GMail dot com>
pkgname=gnome-shell-extension-freon-git
pkgver=44.r0.g457aac4
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')
optdepends=(
'udisks2: optional backend for storage temperature sensors.'
'hddtemp: optional backend for S.M.A.R.T. temperature sensors.'
'nvidia-settings: optional backend for nVidia temperature sensors.'
)
provides=("${pkgname%-*}")
conflicts=("${pkgname%-*}" 'gnome-shell-extensions-git')
source=("${pkgname%-*}::git+${url}")
sha512sums=('SKIP')
pkgver() {
cd "${pkgname%-*}"
( 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)"
)
}
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 -name '*.xml' -exec install -Dm644 -t "${pkgdir}/usr/share/glib-2.0/schemas/" '{}' +
cp -r --no-preserve=ownership,mode icons "${_destdir}"
cd locale
for locale in */
do
install -Dm644 -t "${pkgdir}/usr/share/locale/${locale}/LC_MESSAGES" "${locale}/LC_MESSAGES"/*.mo
done
}
|