summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXZS2016-02-19 21:12:43 +0100
committerXZS2016-02-19 21:12:43 +0100
commitff1277f83afc65d5f1b9a1d4ec65bcca5c7adde2 (patch)
tree67b36ca4854447618b9c6eeba98603a0e559fd95 /PKGBUILD
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>
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD115
1 files changed, 83 insertions, 32 deletions
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]
}