summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2015-08-03 13:52:41 +0200
committerXZS2015-08-03 13:52:41 +0200
commitc456429e79012501057bfec98b91749460fa0aa6 (patch)
treece7fc86bbb4afdd1412fbe52b7b8e99a47665ce6
parent8a96ad64e43b81a2e64efc3302fadf000573f0f9 (diff)
downloadaur-c456429e79012501057bfec98b91749460fa0aa6.tar.gz
adopt package to collection
This package is now 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--PKGBUILD104
-rw-r--r--gschemas.install20
3 files changed, 91 insertions, 49 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ba0978245a9..83181be1c39 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,20 +1,18 @@
pkgbase = gnome-shell-extension-dash-to-dock-git
- pkgdesc = Extends the dash, transforming it into an intellihide dock.
- pkgver = 46.r10.gaa1720b
+ pkgdesc = A gnome-shell extension that transforms the dash into an intellihide dock
+ pkgver = 46.r15.gc28e564
pkgrel = 1
- url = https://github.com/micheleg/dash-to-dock/
+ url = https://micheleg.github.io/dash-to-dock/
install = gschemas.install
arch = any
license = GPL
- makedepends = git
- makedepends = gnome-common
makedepends = intltool
- depends = dconf
+ makedepends = git
+ depends = gnome-shell
provides = gnome-shell-extension-dash-to-dock
- conflicts = gnome-shell-extensions-git
conflicts = gnome-shell-extension-dash-to-dock
- source = gnome-shell-extension-dash-to-dock-git::git+https://github.com/micheleg/dash-to-dock.git
- sha512sums = SKIP
+ source = gnome-shell-extension-dash-to-dock::git+https://github.com/micheleg/dash-to-dock/
+ md5sums = SKIP
pkgname = gnome-shell-extension-dash-to-dock-git
diff --git a/PKGBUILD b/PKGBUILD
index 1c9a0958ad7..8829ca2723e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,47 +1,91 @@
-# Maintainer: Llewelyn Trahaearn <WoefulDerelict at GMail dot com>
-# 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: Llewelyn Trahaearn <WoefulDerelict at GMail dot com>
+# 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.
pkgname=gnome-shell-extension-dash-to-dock-git
-pkgver=46.r10.gaa1720b
+pkgver=46.r15.gc28e564
pkgrel=1
-pkgdesc="Extends the dash, transforming it into an intellihide dock."
+pkgdesc="A gnome-shell extension that transforms the dash into an intellihide dock"
arch=('any')
-url="https://github.com/micheleg/dash-to-dock/"
+url="https://micheleg.github.io/dash-to-dock/"
+_giturl="git+https://github.com/micheleg/dash-to-dock/"
license=('GPL')
depends=('dconf')
-makedepends=('git' 'gnome-common' 'intltool')
-provides=('gnome-shell-extension-dash-to-dock')
-conflicts=('gnome-shell-extensions-git' 'gnome-shell-extension-dash-to-dock')
-install="gschemas.install"
-source=("${pkgname}::git+https://github.com/micheleg/dash-to-dock.git")
-sha512sums=('SKIP')
-_branch=master
+makedepends=('intltool')
+makedepends+=('git')
+source+=("${_gitname:=${pkgname%-git}}::${_giturl:-git+$url}")
+md5sums+=('SKIP')
+provides+=($_gitname)
+conflicts+=($_gitname)
pkgver() {
- cd "${srcdir}/${pkgname}"
- git checkout ${_branch} --quiet
- ( set -o pipefail
- git describe --long --tags 2>/dev/null | sed 's/^extensions.gnome.org.v//;s/\([^-]*-g\)/r\1/;s/-/./g' ||
- printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
- )
+ cd ${_gitname:-$pkgname}
+ git describe --long --tags 2>/dev/null | sed 's/[^[:digit:]]*\(.\+\)-\([[:digit:]]\+\)-g\([[:xdigit:]]\{7\}\)/\1.r\2.g\3/;t;q1'
+ [ ${PIPESTATUS[0]} -ne 0 ] && \
+printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
+depends[gnomeshell]=gnome-shell
-prepare() {
- cd "${srcdir}/${pkgname}"
- git checkout ${_branch}
- sed -i 's/INSTALLBASE = ~\/.local\/share\/gnome-shell\/extensions/INSTALLBASE = ${DESTDIR}/' Makefile
+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[gnomeshell]
}
build() {
- cd "${srcdir}/${pkgname}"
- make
+ cd "$_gitname"
+ make _build
}
package() {
- cd "${srcdir}/${pkgname}"
- mkdir -p "${pkgdir}/usr/share/gnome-shell/extensions" "${pkgdir}/usr/share/glib-2.0/schemas/"
- make DESTDIR="${pkgdir}/usr/share/gnome-shell/extensions" install
- install -m644 "schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml" \
- "${pkgdir}/usr/share/glib-2.0/schemas/org.gnome.shell.extensions.dash-to-dock.gschema.xml"
+ 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" '{}' +
+}
+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" '{}' +
+}
+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
+ )
+}
+
+package_09_media() {
+ cp -r --no-preserve=ownership,mode media "$destdir"
}
diff --git a/gschemas.install b/gschemas.install
index 61789e42d2c..863897ad543 100644
--- a/gschemas.install
+++ b/gschemas.install
@@ -1,20 +1,20 @@
post_install() {
- glib-compile-schemas usr/share/glib-2.0/schemas/
- instructions
+ instruct
+ echo "and enable the extension with gnome-tweak-tool."
}
post_upgrade() {
- glib-compile-schemas usr/share/glib-2.0/schemas/
- instructions
+ instruct
+ echo "for the changes to have an effect."
}
post_remove() {
- glib-compile-schemas usr/share/glib-2.0/schemas/
+ glib-compile-schemas usr/share/glib-2.0/schemas/
}
-instructions() {
- /bin/cat << EOF
-Don't forget to restart GNOME Shell ([Alt]+[F2], r) and to enable extension
-with gnome-tweak-tool.
-EOF
+instruct() {
+ post_remove
+ echo "Don't forget to restart GNOME Shell ([Alt]+[F2], r)"
}
+
+# vim: ts=2 sw=2 et: