summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2015-08-06 14:43:54 +0200
committerXZS2015-08-06 14:43:54 +0200
commitd129d8d911a76beac803f2d3b091b244ed63b0ed (patch)
treeb34f3edf2ab21e086f8cf410655fb5fac9b1682b
parent927c90ebbdc0547e6c462b2feecc5f4b78a5cb05 (diff)
downloadaur-d129d8d911a76beac803f2d3b091b244ed63b0ed.tar.gz
sort package functions
Sorting the template inclusion by the order of their package functions being called showed a bug swallowing dependencies. Misusing the indexed array of dependencies placed the element assigned by a key in first position always overwriting an already present element. Using a symbolic number makes it work fine as long as it is ensured that this number is greater than the number of dependencies, which should be fairly probable with 125.
-rw-r--r--.SRCINFO1
-rw-r--r--PKGBUILD51
2 files changed, 27 insertions, 25 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7fdb5a51b16..8599f036945 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -8,6 +8,7 @@ pkgbase = gnome-shell-extension-dash-to-dock-git
license = GPL
makedepends = intltool
makedepends = git
+ depends = dconf
depends = gnome-shell
provides = gnome-shell-extension-dash-to-dock
conflicts = gnome-shell-extension-dash-to-dock
diff --git a/PKGBUILD b/PKGBUILD
index ba71b6df8b9..b6cc6aacaf5 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -27,22 +27,6 @@ pkgver() {
[ ${PIPESTATUS[0]} -ne 0 ] && \
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
-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]
-}
build() {
cd "$_gitname"
@@ -66,15 +50,11 @@ package_02_install() {
msg2 'Installing extension code...'
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" '{}' +
+package_09_media() {
+ cp -r --no-preserve=ownership,mode media "$destdir"
}
+
package_10_locale() {
msg2 'Installing translations...'
(
@@ -85,7 +65,28 @@ package_10_locale() {
done
)
}
+if [ -z "$install" ]
+then
+ install=gschemas.install
+fi
-package_09_media() {
- cp -r --no-preserve=ownership,mode media "$destdir"
+package_10_schemas() {
+ msg2 'Installing schemas...'
+ find -name '*.xml' -exec install -Dm644 -t "$pkgdir/usr/share/glib-2.0/schemas" '{}' +
+}
+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]
}