summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schendel2021-02-18 10:13:46 +0100
committerChristian Schendel2021-02-18 10:13:46 +0100
commit883ed7f39986bfff42cf5a3ad9f75502ba8de0f1 (patch)
tree29190936d1e7c98d09ad2f14e265705835e87d4a
parent59df7e3e90bb992481a0e69f7a8d8976d8576fde (diff)
downloadaur-883ed7f39986bfff42cf5a3ad9f75502ba8de0f1.tar.gz
install gschemas
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD24
-rwxr-xr-xgnome-shell-extension-applications-overview-tooltip.install37
3 files changed, 36 insertions, 27 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 10440c0bdfd9..8448bde5dd8e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = gnome-shell-extension-applications-overview-tooltip-git
pkgdesc = Shows a tooltip over applications icons on applications overview
pkgver = 10.r3.gf90ddba
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/RaphaelRochet/applications-overview-tooltip
install = gnome-shell-extension-applications-overview-tooltip.install
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index 3bf5be7f744a..49757b029ec4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Christian Schendel <doppelhelix at gmail dot com>
pkgname=gnome-shell-extension-applications-overview-tooltip-git
pkgver=10.r3.gf90ddba
-pkgrel=1
+pkgrel=2
pkgdesc="Shows a tooltip over applications icons on applications overview"
arch=(any)
url="https://github.com/RaphaelRochet/applications-overview-tooltip"
@@ -11,7 +11,7 @@ depends=('gnome-shell>=3.38')
makedepends=('git' 'glib2')
conflicts=("${pkgname%-git}")
provides=(${pkgname%-git})
-source=("${pkgname%-git}::git+https://github.com/RaphaelRochet/applications-overview-tooltip.git")
+source=("${pkgname%-git}::git+${url}.git")
sha256sums=('SKIP')
pkgver() {
@@ -20,15 +20,13 @@ pkgver() {
}
package() {
- _uuid="applications-overview-tooltip@RaphaelRochet"
- cd "${srcdir}"
- chmod -R 644 ./*
- install -d "${pkgdir}/usr/share/gnome-shell/extensions/"
- mv ${pkgname%-git} ${_uuid}
- cp -r "${_uuid}" "${pkgdir}/usr/share/gnome-shell/extensions/"
- #rebuild compiled schemas if missing
- if [[ ! -f "${pkgdir}/usr/share/gnome-shell/extensions/${_uuid}/schemas/gschemas.compiled" ]]; then
- glib-compile-schemas ${pkgdir}/usr/share/gnome-shell/extensions/${_uuid}/schemas
- fi
- chmod -R 755 "${pkgdir}/usr/share/gnome-shell/extensions/${_uuid}/"
+ cd "${srcdir}/${pkgname%-git}"
+ local uuid=$(grep -Po '(?<="uuid": ")[^"]*' metadata.json)
+ local schema=$(grep -Po '(?<="settings-schema": ")[^"]*' metadata.json).gschema.xml
+ local destdir="$pkgdir/usr/share/gnome-shell/extensions/$uuid"
+ install -dm755 "$destdir"
+ install -Dm644 "${srcdir}/${pkgname%-git}/schemas/org.gnome.shell.extensions.appoverviewtooltip.gschema.xml" \
+ "${pkgdir}/usr/share/glib-2.0/schemas/${schema}"
+ cp -r * "$destdir"
+
}
diff --git a/gnome-shell-extension-applications-overview-tooltip.install b/gnome-shell-extension-applications-overview-tooltip.install
index 0f2f84b309b8..7f4546e45017 100755
--- a/gnome-shell-extension-applications-overview-tooltip.install
+++ b/gnome-shell-extension-applications-overview-tooltip.install
@@ -1,19 +1,30 @@
-# Colored makepkg-like functions
-all_off="$(tput sgr0)"
-bold="${all_off}$(tput bold)"
-blue="${bold}$(tput setaf 4)"
-yellow="${bold}$(tput setaf 3)"
-
-note() {
- printf "${blue}==>${yellow} NOTE:${bold} $1${all_off}\n"
-}
-
post_install() {
- note "Restart GNOME Shell ([Alt]+[F2], r)."
- note "Activate the extension with gnome-tweak-tool."
+ /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/
+ instructions_install
}
post_upgrade() {
- note "Restart GNOME Shell ([Alt]+[F2], r) to load the upgraded extension."
+ /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/
+ instructions_upgrade
+}
+
+post_remove() {
+ /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/
}
+instructions_install() {
+ /bin/cat << EOF
+
+Restart GNOME Shell ([Alt]+[F2], r).
+Activate the extension with gnome-tweak-tool.
+
+EOF
+}
+
+instructions_upgrade() {
+ /bin/cat << EOF
+
+Restart GNOME Shell ([Alt]+[F2], r) to load the upgraded extension.
+
+EOF
+}