summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD17
2 files changed, 17 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index a83cda27a55..29280698a7e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -6,7 +6,7 @@ pkgbase = gnome-shell-extension-activities-config
install = gschemas.install
arch = any
license = GPLv2
- depends = gnome-shell>=3.8
+ depends = gnome-shell
depends = gnome-shell-extensions
source = extension.html::https://extensions.gnome.org/extension/358/activities-configurator/
source = archlinux-logo-gray-scalable.svg
diff --git a/PKGBUILD b/PKGBUILD
index d6ee75774b2..f135d8749db 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -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