summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorXZS2015-07-28 14:40:04 +0200
committerXZS2015-07-28 14:40:04 +0200
commit9b213fb807b231e300f49bf2800bc621b85a16a5 (patch)
tree8e4564ecbf54cc2f2693dd78d451a313d1e78601 /PKGBUILD
downloadaur-9b213fb807b231e300f49bf2800bc621b85a16a5.tar.gz
intital import from old AUR version 3
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD58
1 files changed, 58 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..3615a746c6b4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# 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.
+
+pkgname='gnome-shell-extension-maximus-two-git'
+pkgdesc="Removes the title bar on maximised windows"
+pkgver=r14.ca00e8a
+pkgrel=2
+arch=(any)
+url='https://github.com/johnhoran/GnomeExtensionMaximusTwo'
+license=(GPLv3)
+depends=('xorg-xprop' 'wmctrl')
+install=notice.install
+
+makedepends+=('git')
+source+=("${_gitname:=${pkgname%-git}}::${_giturl:-git+$url}")
+md5sums+=('SKIP')
+provides+=($_gitname)
+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)"
+}
+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
+ $function
+ done
+}
+package_01_locate() {
+ msg2 'Locating extension...'
+ cd "$(dirname $(find -name 'metadata.json' -print -quit))"
+ extname=$(grep -Po '(?<="uuid": ")[^"]*' metadata.json)
+ destdir="$pkgdir/usr/share/gnome-shell/extensions/$extname"
+}
+
+package_02_install() {
+ msg2 'Installing extension code...'
+ find -maxdepth 1 \( -iname '*.js*' -or -iname '*.css' -or -iname '*.ui' \) -exec install -Dm644 -t "$destdir" '{}' +
+}