summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2016-02-19 21:12:43 +0100
committerXZS2016-02-19 21:12:43 +0100
commitff1277f83afc65d5f1b9a1d4ec65bcca5c7adde2 (patch)
tree67b36ca4854447618b9c6eeba98603a0e559fd95
parent441e24e9a153eb104a773270118cb3a120a42e8c (diff)
downloadaur-ff1277f83afc65d5f1b9a1d4ec65bcca5c7adde2.tar.gz
adopt package to collection
This package is now again maintained as part of the collection of gnome-shell-extensions and related templates on GitHub. <https://github.com/dffischer/gnome-shell-extensions>
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD115
-rw-r--r--gschemas.install24
3 files changed, 101 insertions, 54 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c225da1c187..a8cb823b426 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,18 @@
# Generated by mksrcinfo v8
-# Fri Feb 19 18:52:03 UTC 2016
+# Fri Feb 19 20:12:20 UTC 2016
pkgbase = gnome-shell-extension-dash-to-dock
- pkgdesc = This extension moves the dash out of the overview transforming it in a dock for an easier launching of applications and a faster switching between windows and desktops.
- pkgver = 49
+ pkgdesc = move the dash out of the overview transforming it in a dock for an easier launching of applications and a faster switching between windows and desktops
+ pkgver = 50
pkgrel = 1
- epoch = 1
url = https://micheleg.github.io/dash-to-dock/
install = gschemas.install
arch = any
- license = GPL2
- makedepends = gnome-common
+ license = GPL
makedepends = intltool
depends = dconf
- conflicts = gnome-shell-extensions-dash-to-dock-git
- source = https://github.com/micheleg/dash-to-dock/archive/extensions.gnome.org-v49.tar.gz
- sha256sums = 50bd242f3f6e6089137957c175462475d10a2e39f6014184b792248ed7708084
+ depends = gnome-shell
+ source = https://micheleg.github.io/dash-to-dock/releases.html
+ md5sums = SKIP
pkgname = gnome-shell-extension-dash-to-dock
diff --git a/PKGBUILD b/PKGBUILD
index 2020fa80702..50c04c2cb1a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,38 +1,89 @@
-# Maintainer: Carl George < arch at cgtx dot us >
-# Contributor: XZS < d dot f dot fischer at web dot de >
-# Contributor: Janne Haapsaari < haaja at iki dot fi >
-# Contributor: Christopher Krooß < didi2002 at web dot de >
+# Maintainer: XZS <d dot f dot fischer at web dot de>
+# Contributor: Carl George < arch at cgtx dot us >
+# Contributor: Janne Haapsaari <haaja@iki.fi>
+# Contributor: Christopher Krooß <didi2002 at web.de>
+# This PKGBUILD is maintained on GitHub <https://github.com/dffischer/gnome-shell-extensions>.
+# You may find it convenient to file issues and pull requests there.
-_extname="dash-to-dock"
-_author="micheleg"
-
-pkgname="gnome-shell-extension-${_extname}"
-pkgver=49
+pkgname=gnome-shell-extension-dash-to-dock
+pkgver=50
pkgrel=1
-epoch=1
-pkgdesc="This extension moves the dash out of the overview transforming it in a dock for an easier launching of applications and a faster switching between windows and desktops."
-arch=("any")
-url="https://${_author}.github.io/${_extname}/"
-license=("GPL2")
-depends=("dconf")
-makedepends=("gnome-common" "intltool")
-conflicts=("gnome-shell-extensions-dash-to-dock-git")
-install="gschemas.install"
-source=("https://github.com/${_author}/${_extname}/archive/extensions.gnome.org-v${pkgver}.tar.gz")
-noextract=()
-sha256sums=('50bd242f3f6e6089137957c175462475d10a2e39f6014184b792248ed7708084')
-
-build() {
- cd "${srcdir}/${_extname}-extensions.gnome.org-v${pkgver}"
- make
+pkgdesc="move the dash out of the overview transforming it in a dock for an easier launching of applications and a faster switching between windows and desktops"
+arch=('any')
+url="https://micheleg.github.io/dash-to-dock/"
+license=('GPL')
+depends=('dconf')
+makedepends=('intltool')
+source=("https://micheleg.github.io/dash-to-dock/releases.html")
+md5sums=('SKIP')
+
+pkgver() {
+ grep -Pom1 '(?<=Version )[[:digit:]]+' releases.html
+}
+
+prepare() {
+ if [ ! -f *.shell-extension.zip ]; then
+ curl -OL $(grep -om1 \
+ 'https://extensions.gnome.org/.*/[[:digit:]]\+.shell-extension.zip' \
+ releases.html)
+ fi
+ unzip -o *.shell-extension.zip
}
package() {
- cd "${srcdir}/${_extname}-extensions.gnome.org-v${pkgver}"
- make \
- INSTALLBASE="${pkgdir}/usr/share/gnome-shell/extensions" \
- VERSION="${pkgver}" \
- install
- _gschema="schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml"
- install -Dm0644 "${_gschema}" "${pkgdir}/usr/share/glib-2.0/${_gschema}"
+ for function in $(declare -F | grep -Po 'package_[[:digit:]]+[[:alpha:]_]*$')
+ do
+ $function
+ done
+}
+package_01_locate() {
+ msg2 'Locating extension...'
+ cd "$(dirname $(find -name 'metadata.json' -print -quit))"
+ extname=$(grep -Po '(?<="uuid": ")[^"]*' metadata.json)
+ destdir="$pkgdir/usr/share/gnome-shell/extensions/$extname"
+}
+
+package_02_install() {
+ msg2 'Installing extension code...'
+ find -maxdepth 1 \( -iname '*.js*' -or -iname '*.css' -or -iname '*.ui' \) -exec install -Dm644 -t "$destdir" '{}' +
+}
+
+package_09_media() {
+ cp -r --no-preserve=ownership,mode media "$destdir"
+}
+
+package_10_locale() {
+ msg2 'Installing translations...'
+ (
+ cd locale
+ for locale in */
+ do
+ install -Dm644 -t "$pkgdir/usr/share/locale/$locale/LC_MESSAGES" "$locale/LC_MESSAGES"/*.mo
+ done
+ )
+}
+if [ -z "$install" ]
+then
+ install=gschemas.install
+fi
+
+package_10_schemas() {
+ msg2 'Installing schemas...'
+ find -name '*.xml' -exec install -Dm644 -t "$pkgdir/usr/share/glib-2.0/schemas" '{}' +
+}
+depends[125]=gnome-shell
+
+package_20_version() {
+ local compatibles=($(\
+ find -path ./pkg -type d -prune -o \
+ -name metadata.json -exec grep -Pzo '(?s)(?<="shell-version": \[)[^\[\]]*(?=\])' '{}' \; | \
+ tr '\n," ' '\n' | sed 's/3\.//g;/^$/d' | sort -n -t. -k 1,1))
+ depends+=("gnome-shell>=3.${compatibles[0]}")
+ local max="${compatibles[-1]}"
+ if [ "3.$max" != $(
+ gnome-shell --version | grep -Po '(?<=GNOME Shell 3\.)[[:digit:]]+'
+ ) ]; then
+ depends+=("gnome-shell<3.$((${max%%.*} + 1))")
+ fi
+ unset depends[125]
}
diff --git a/gschemas.install b/gschemas.install
index 4c2186853ae..863897ad543 100644
--- a/gschemas.install
+++ b/gschemas.install
@@ -1,22 +1,20 @@
-compile_schemas() {
- glib-compile-schemas /usr/share/glib-2.0/schemas/
-}
-
-instructions() {
- echo "Don't forget to restart GNOME Shell ([Alt]+[F2], r) and to enable extension with gnome-tweak-tool."
-}
-
post_install() {
- compile_schemas
- instructions
+ instruct
+ echo "and enable the extension with gnome-tweak-tool."
}
post_upgrade() {
- compile_schemas
- instructions
+ instruct
+ echo "for the changes to have an effect."
}
post_remove() {
- compile_schemas
+ glib-compile-schemas usr/share/glib-2.0/schemas/
+}
+
+instruct() {
+ post_remove
+ echo "Don't forget to restart GNOME Shell ([Alt]+[F2], r)"
}
+# vim: ts=2 sw=2 et: