summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2015-08-06 14:43:19 +0200
committerXZS2015-08-06 14:43:19 +0200
commit9a8a59c497ec33547f96a2b67e8897857873bc07 (patch)
tree54aaa8f6ae5f697c977aa1c8db7623bf1a278fd3
parent2d03f63b5bd6743acc25e87d46f6f7ce35237674 (diff)
downloadaur-9a8a59c497ec33547f96a2b67e8897857873bc07.tar.gz
sort package functions
-rw-r--r--.SRCINFO2
-rw-r--r--PKGBUILD61
2 files changed, 32 insertions, 31 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 61ca76b26db..35347f63018 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -7,8 +7,8 @@ pkgbase = gnome-shell-extension-caffeine-git
arch = any
license = GPLv2
makedepends = git
- depends = gnome-shell
depends = gnome-shell-extensions
+ depends = gnome-shell
provides = gnome-shell-extension-caffeine
conflicts = gnome-shell-extension-caffeine
source = gnome-shell-extension-caffeine::git+https://github.com/eonpatapon/gnome-shell-extension-caffeine
diff --git a/PKGBUILD b/PKGBUILD
index 070805309a8..839c89f079e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -21,22 +21,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]
-}
package() {
for function in $(declare -F | grep -Po 'package_[[:digit:]]+[[:alpha:]_]*$')
do
@@ -54,15 +38,18 @@ 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
+depends+=(gnome-shell-extensions)
-package_10_schemas() {
- msg2 'Installing schemas...'
- find -name '*.xml' -exec install -Dm644 -t "$pkgdir/usr/share/glib-2.0/schemas" '{}' +
+package_03_unify_conveniencejs() {
+ ln -fs \
+ ../user-theme@gnome-shell-extensions.gcampax.github.com/convenience.js \
+ "$destdir/convenience.js"
}
+
+package_09_icons() {
+ cp -r --no-preserve=ownership,mode icons "$destdir"
+}
+
package_10_locale() {
msg2 'Installing translations...'
(
@@ -73,14 +60,28 @@ package_10_locale() {
done
)
}
-depends+=(gnome-shell-extensions)
+if [ -z "$install" ]
+then
+ install=gschemas.install
+fi
-package_03_unify_conveniencejs() {
- ln -fs \
- ../user-theme@gnome-shell-extensions.gcampax.github.com/convenience.js \
- "$destdir/convenience.js"
+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_09_icons() {
- cp -r --no-preserve=ownership,mode icons "$destdir"
+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]
}