diff options
-rw-r--r-- | .SRCINFO | 12 | ||||
-rw-r--r-- | PKGBUILD | 54 | ||||
-rw-r--r-- | gnome-shell-extension-mediaplayer.install | 13 | ||||
-rw-r--r-- | gschemas.install | 20 |
4 files changed, 67 insertions, 32 deletions
@@ -1,18 +1,20 @@ pkgbase = gnome-shell-extension-mediaplayer-git pkgdesc = A mediaplayer indicator for the Gnome Shell - pkgver = 3.10.r445.2b62dc0 + pkgver = r502.89216cd pkgrel = 1 url = https://github.com/eonpatapon/gnome-shell-extensions-mediaplayer - install = gnome-shell-extension-mediaplayer.install + install = gschemas.install arch = any license = GPL2 - makedepends = git makedepends = gnome-common makedepends = intltool + makedepends = git depends = gnome-shell optdepends = mpdris2-git: MPD support - source = gnome-shell-extension-mediaplayer::git+https://github.com/eonpatapon/gnome-shell-extensions-mediaplayer.git - sha256sums = SKIP + provides = gnome-shell-extension-mediaplayer + conflicts = gnome-shell-extension-mediaplayer + source = gnome-shell-extension-mediaplayer::git+https://github.com/eonpatapon/gnome-shell-extensions-mediaplayer + md5sums = SKIP pkgname = gnome-shell-extension-mediaplayer-git @@ -1,38 +1,64 @@ -# Maintainer: Morris Jobke <hey at morrisjobke dot de> +# Maintainer: XZS <d dot f dot fischer at web dot de> +# Contributor: Morris Jobke <hey at morrisjobke dot de> # Contributor: alucryd <alucryd 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-mediaplayer-git -pkgver=3.10.r445.2b62dc0 +pkgver=r502.89216cd pkgrel=1 pkgdesc='A mediaplayer indicator for the Gnome Shell' arch=('any') url='https://github.com/eonpatapon/gnome-shell-extensions-mediaplayer' license=('GPL2') -depends=('gnome-shell') -makedepends=('git' 'gnome-common' 'intltool') +makedepends=('gnome-common' 'intltool') optdepends=('mpdris2-git: MPD support') -install=${pkgname%-*}.install -source=("${pkgname%-*}::git+${url}.git") -sha256sums=('SKIP') +install=gschemas.install +makedepends+=('git') +source+=("${_gitname:=${pkgname%-git}}::${_giturl:-git+$url}") +md5sums+=('SKIP') +provides+=($_gitname) +conflicts+=($_gitname) pkgver() { - cd ${pkgname%-*} - - printf "3.10.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)" } build() { - cd ${pkgname%-*} - + cd "$_gitname" ./autogen.sh ./configure --prefix='/usr' --disable-schemas-compile make } package() { - cd ${pkgname%-*} + for function in $(declare -F | grep -Po 'package_[[:digit:]]+[[:alpha:]_]*$') + do + $function + done +} +package_01_make_install() { + cd "$_gitname" make DESTDIR="${pkgdir}" install } -# vim: ts=2 sw=2 et: +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/gnome-shell-extension-mediaplayer.install b/gnome-shell-extension-mediaplayer.install deleted file mode 100644 index 29753c3fa523..000000000000 --- a/gnome-shell-extension-mediaplayer.install +++ /dev/null @@ -1,13 +0,0 @@ -post_install() { - glib-compile-schemas usr/share/glib-2.0/schemas/ -} - -post_upgrade() { - post_install -} - -post_remove() { - post_install -} - -# vim: ts=2 sw=2 et: diff --git a/gschemas.install b/gschemas.install new file mode 100644 index 000000000000..863897ad5436 --- /dev/null +++ b/gschemas.install @@ -0,0 +1,20 @@ +post_install() { + instruct + echo "and enable the extension with gnome-tweak-tool." +} + +post_upgrade() { + instruct + echo "for the changes to have an effect." +} + +post_remove() { + 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: |