diff options
author | Mark Wagie | 2021-06-01 20:01:57 -0600 |
---|---|---|
committer | Mark Wagie | 2021-06-01 20:01:57 -0600 |
commit | d6d98cea994a89b41491668b8c52bb4be4772785 (patch) | |
tree | 14f895666caffd4e75081a72f32b5fa2d14cb1e3 | |
parent | 034c9731c227dd0aa7647678694c7a38d9d238a5 (diff) | |
download | aur-d6d98cea994a89b41491668b8c52bb4be4772785.tar.gz |
rewrite PKGBUILD
-rw-r--r-- | .SRCINFO | 11 | ||||
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | PKGBUILD | 71 |
3 files changed, 30 insertions, 59 deletions
@@ -1,16 +1,15 @@ pkgbase = gnome-shell-extension-mpris-indicator-button-git - pkgdesc = A mediaplayer indicator for the Gnome Shell - pkgver = r82.97e4207 + pkgdesc = A full featured MPRIS indicator button extension for GNOME Shell 3.38+ + pkgver = r180.c24c68e pkgrel = 1 - url = https://github.com/JasonLG1979/gnome-shell-extensions-mpris-indicator-button + url = https://github.com/JasonLG1979/gnome-shell-extension-mpris-indicator-button arch = any license = GPL3 makedepends = git depends = gnome-shell - provides = gnome-shell-extension-mpris-indicator-button=r82.97e4207 + provides = gnome-shell-extension-mpris-indicator-button conflicts = gnome-shell-extension-mpris-indicator-button - source = gnome-shell-extension-mpris-indicator-button::git+https://github.com/JasonLG1979/gnome-shell-extensions-mpris-indicator-button - md5sums = SKIP + source = git+https://github.com/JasonLG1979/gnome-shell-extension-mpris-indicator-button.git sha256sums = SKIP pkgname = gnome-shell-extension-mpris-indicator-button-git diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..4dab8d6386e3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +# Ignore everything +* + +# But not these files... +!.gitignore +!PKGBUILD +!.SRCINFO @@ -1,63 +1,28 @@ -# Maintainer: XZS <d dot f dot fischer at web dot 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. - +# Maintainer: Mark Wagie <mark dot wage at tutanota dot com> +# Contributor: XZS <d dot f dot fischer at web dot de> pkgname=gnome-shell-extension-mpris-indicator-button-git -pkgver=r82 +pkgver=r180.c24c68e pkgrel=1 -pkgdesc='A mediaplayer indicator for the Gnome Shell' +pkgdesc="A full featured MPRIS indicator button extension for GNOME Shell 3.38+" arch=('any') -url='https://github.com/JasonLG1979/gnome-shell-extensions-mpris-indicator-button' +url="https://github.com/JasonLG1979/gnome-shell-extension-mpris-indicator-button" license=('GPL3') +depends=('gnome-shell') +makedepends=('git') +provides=("${pkgname%-git}") +conflicts=("${pkgname%-git}") +source=('git+https://github.com/JasonLG1979/gnome-shell-extension-mpris-indicator-button.git') +sha256sums=('SKIP') -makedepends+=('git') -source+=("${_gitname:=${pkgname%-git}}::${_giturl:-git+$url}") -for integ in $(get_integlist) -do - typeset -n array="${integ}sums" - array+=('SKIP') -done -provides+=("$_gitname=$pkgver") -conflicts+=("$_gitname") pkgver() { - 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)" -} -package() { - for function in $(declare -F | grep -Po 'package_[[:digit:]]+[[:alpha:]_]*$') - do - $function - done -} -package_01_locate() { - msg2 'Locating extension...' - cd "$(find -name 'metadata.json' -execdir test -e extension.js \; \ - -printf '%C@ %h\n' | sort -nr | sed 's/^.* //;q' )" - extname=$(grep -Po '(?<="uuid": ")[^"]*' metadata.json) - destdir="$pkgdir/usr/share/gnome-shell/extensions/$extname" + cd "$srcdir/${pkgname%-git}" + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" } -package_02_install() { - msg2 'Installing extension code...' - find -maxdepth 1 \( -iname '*.js*' -or -iname '*.css' -or -iname '*.ui' \) \ - -exec install -Dm644 -t "$destdir" '{}' + -} -depends[125]=gnome-shell +package() { + cd "$srcdir/${pkgname%-git}" + _uuid='mprisindicatorbutton@JasonLG1979.github.io' -package_20_version() { - local compatibles=($(\ - find -path ./pkg -type d -prune -o \ - -name metadata.json -exec cat '{}' \; | \ - tr -d '\n' | grep -Po '(?<="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 [ "$max" != $( - gnome-shell --version | grep -Po '(?<=GNOME Shell 3\.)[[:digit:]]+' - ) ]; then - depends+=("gnome-shell<3.$((${max%%.*} + 1))") - fi - unset depends[125] + install -d "$pkgdir/usr/share/gnome-shell/extensions" + cp -r "$_uuid" "$pkgdir/usr/share/gnome-shell/extensions" } |