diff options
author | XZS | 2015-08-05 12:47:16 +0200 |
---|---|---|
committer | XZS | 2015-08-05 12:47:16 +0200 |
commit | c141932b6ec4f7ce0772d0fa30effca22cb9233e (patch) | |
tree | 4415d6678d35759034aba658e505f1ab579c7328 /PKGBUILD | |
parent | 4877fe4d763c8dda0a2857557801cf458e8b5b3b (diff) | |
download | aur-c141932b6ec4f7ce0772d0fa30effca22cb9233e.tar.gz |
automatically find version boundaries
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -9,7 +9,6 @@ pkgdesc="Configure the Activities Button with the Activities Configurator Extens arch=(any) url="https://extensions.gnome.org/extension/358/activities-configurator/" license=(GPLv2) -depends=('gnome-shell>=3.8') source=("extension.html::$url" 'archlinux-logo-gray-scalable.svg') md5sums=('SKIP' @@ -47,6 +46,22 @@ build() { cp --remove-destination ../archlinux-logo-gray-scalable.svg archlinux-logo-gray-scalable.svg } +depends[gnomeshell]=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[gnomeshell] +} package() { for function in $(declare -F | grep -Po 'package_[[:digit:]]+[[:alpha:]_]*$') do |