summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schendel2021-02-19 22:49:34 +0100
committerChristian Schendel2021-02-19 22:49:34 +0100
commitade5cda4524402e3e2fa78c5ff41e1675648ae6d (patch)
treef9d6194a5464740ce46bfec1c172726be0f566a1
parentd52065be187cf7ba5436ecd8f4aa3e4bf58f1ef9 (diff)
downloadaur-ade5cda4524402e3e2fa78c5ff41e1675648ae6d.tar.gz
install gschema
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD29
-rw-r--r--gnome-shell-extension-compiz-windows-effect.install24
3 files changed, 32 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cb225194efc..2d01edc2b64 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = gnome-shell-extension-compiz-windows-effect-git
pkgdesc = Compiz wobbly windows effect with libanimation engine.
pkgver = r14.3e34af7
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/hermes83/compiz-windows-effect
install = gnome-shell-extension-compiz-windows-effect.install
arch = any
diff --git a/PKGBUILD b/PKGBUILD
index 7c3797eed44..b134ddc6afc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=gnome-shell-extension-compiz-windows-effect-git
pkgver=r14.3e34af7
-pkgrel=2
+pkgrel=3
pkgdesc="Compiz wobbly windows effect with libanimation engine."
arch=('any')
url="https://github.com/hermes83/compiz-windows-effect"
@@ -13,25 +13,28 @@ optdepends=("libanimation-gnome-shell-git")
makedepends=('git' 'glib2')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
-source=("${pkgname%-git}::git+https://github.com/hermes83/compiz-windows-effect.git")
+source=("${pkgname%-git}::git+${url}.git")
sha256sums=('SKIP')
pkgver() {
cd "${srcdir}/${pkgname%-git}"
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
}
package() {
- local _uuid="compiz-windows-effect@hermes83.github.com"
- local _destdir="$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 schema=org.gnome.shell.extensions.com.github.hermes83.compiz-alike-windows-effect.gschema.xml
+ local destdir="${pkgdir}/usr/share/gnome-shell/extensions/${uuid}"
+
+ install -dm755 "${destdir}"
find . -regextype posix-egrep -regex ".*\.(js|json)$" -exec\
- install -Dm 644 {} ${_destdir}/{} \;
- cp -R schemas "${_destdir}"
- #rebuild compiled GSettings schemas if missing
- if [[ ! -f "${_destdir}/schemas/gschemas.compiled" ]]; then
- glib-compile-schemas "${_destdir}/schemas"
- fi
- chmod -R 755 "${_destdir}"
+ install -Dm 644 {} ${destdir}/{} \;
+ install -Dm644 "${srcdir}/${pkgname%-git}/schemas/${schema}" \
+ "${pkgdir}/usr/share/glib-2.0/schemas/${schema}"
}
diff --git a/gnome-shell-extension-compiz-windows-effect.install b/gnome-shell-extension-compiz-windows-effect.install
index 19bbbb3c8b7..7f4546e4501 100644
--- a/gnome-shell-extension-compiz-windows-effect.install
+++ b/gnome-shell-extension-compiz-windows-effect.install
@@ -1,24 +1,30 @@
post_install() {
- instructions_install
+ /usr/bin/glib-compile-schemas /usr/share/glib-2.0/schemas/
+ instructions_install
}
post_upgrade() {
- instructions_upgrade
+ /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() {
- cat <<-EOT
+ /bin/cat << EOF
- Restart GNOME Shell ([Alt]+[F2], r).
- Activate the extension with gnome-tweak-tool.
+Restart GNOME Shell ([Alt]+[F2], r).
+Activate the extension with gnome-tweak-tool.
- EOT
+EOF
}
instructions_upgrade() {
- cat <<-EOT
+ /bin/cat << EOF
- Restart GNOME Shell ([Alt]+[F2], r) to load the upgraded extension.
+Restart GNOME Shell ([Alt]+[F2], r) to load the upgraded extension.
- EOT
+EOF
}