summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXZS2015-08-03 13:53:17 +0200
committerXZS2015-08-03 13:53:17 +0200
commit387696a5f1c8082f817d8ad80a0974cce215056c (patch)
treebb830bc289472caa7a0e22a372b0837b9b1ef9ac /PKGBUILD
parente292ed0947855531a9802292af287edc6964076e (diff)
downloadaur-387696a5f1c8082f817d8ad80a0974cce215056c.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>
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD95
1 files changed, 61 insertions, 34 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 921c585f8a1c..211475b73843 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,53 +1,80 @@
-# Maintainer: Llewelyn Trahaearn <WoefulDerelict at GMail dot com>
-# Contributor: XZS <d dot f dot fischer at web dot de>
+# Maintainer: XZS <d dot f dot fischer at web dot de>
+# Contributor: Llewelyn Trahaearn <WoefulDerelict at GMail dot com>
+# 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-volume-mixer-git"
-pkgver=0.9.1.r0.gf289b00
-pkgrel=2
-pkgdesc="Enable configuration of individual PulseAudio mixers from GNOME Shell's status menu."
-arch=('any')
+pkgver=0.9.r0.g3e7a459
+pkgrel=1
+pkgdesc="Applet allowing separate configuration of pulseaudio mixers"
+arch=(any)
url="https://github.com/aleho/gnome-shell-volume-mixer"
-license=('GPL2')
-depends=('gnome-shell' 'python')
-makedepends=('git')
-provides=("${pkgname%-*}")
-conflicts=("${pkgname%-*}")
-install=gschemas.install
-source=("${pkgname%-*}::git+https://github.com/aleho/gnome-shell-volume-mixer.git")
-sha512sums=('SKIP')
-_branch=master
+license=(GPLv2)
+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 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)"
- )
+ 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}
+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]
}
-
package() {
- cd "${srcdir}/${pkgname%-*}"
+ 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'))"
- _extname=$(grep -Po '(?<="uuid": ")[^"]*' metadata.json)
- _destdir="${pkgdir}/usr/share/gnome-shell/extensions/${_extname}"
+ 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}" '{}' +
- cp -r --no-preserve=ownership pautils "${_destdir}"
+ 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" '{}' +
- msg2 'Installing localization files...'
+ 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
+ install -Dm644 -t "$pkgdir/usr/share/locale/$locale/LC_MESSAGES" "$locale/LC_MESSAGES"/*.mo
done
)
}
+
+package_09_pautils() {
+ cp -r --no-preserve=ownership pautils "$destdir"
+}