summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorXZS2015-07-28 14:40:02 +0200
committerXZS2015-07-28 14:40:02 +0200
commitf4816d41f7f2cb81d0ba25e53247963945ff4d9f (patch)
treeb360c3a18ea3ac2e8c67fe00304bb599afead664
downloadaur-f4816d41f7f2cb81d0ba25e53247963945ff4d9f.tar.gz
intital import from old AUR version 3
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD86
-rw-r--r--gschemas.install20
3 files changed, 124 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..61ca76b26db
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = gnome-shell-extension-caffeine-git
+ pkgdesc = Fill the cup to inhibit auto suspend and screensaver.
+ pkgver = r84.f3053b3
+ pkgrel = 1
+ url = https://github.com/eonpatapon/gnome-shell-extension-caffeine
+ install = gschemas.install
+ arch = any
+ license = GPLv2
+ makedepends = git
+ depends = gnome-shell
+ depends = gnome-shell-extensions
+ provides = gnome-shell-extension-caffeine
+ conflicts = gnome-shell-extension-caffeine
+ source = gnome-shell-extension-caffeine::git+https://github.com/eonpatapon/gnome-shell-extension-caffeine
+ md5sums = SKIP
+
+pkgname = gnome-shell-extension-caffeine-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..2465deedc67
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,86 @@
+# 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-caffeine-git"
+pkgdesc="Fill the cup to inhibit auto suspend and screensaver."
+pkgver=r84.f3053b3
+pkgrel=1
+arch=(any)
+url="https://github.com/eonpatapon/gnome-shell-extension-caffeine"
+license=(GPLv2)
+
+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" '{}' +
+}
+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_10_locale() {
+ msg2 'Installing translations...'
+ (
+ cd locale
+ for locale in */
+ do
+ install -Dm644 -t "$pkgdir/usr/share/locale/$locale/LC_MESSAGES" "$locale/LC_MESSAGES"/*.mo
+ done
+ )
+}
+depends+=(gnome-shell-extensions)
+
+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"
+}
diff --git a/gschemas.install b/gschemas.install
new file mode 100644
index 00000000000..863897ad543
--- /dev/null
+++ b/gschemas.install
@@ -0,0 +1,20 @@
+post_install() {
+ instruct
+ echo "and enable the extension with gnome-tweak-tool."
+}
+
+post_upgrade() {
+ instruct
+ echo "for the changes to have an effect."
+}
+
+post_remove() {
+ glib-compile-schemas usr/share/glib-2.0/schemas/
+}
+
+instruct() {
+ post_remove
+ echo "Don't forget to restart GNOME Shell ([Alt]+[F2], r)"
+}
+
+# vim: ts=2 sw=2 et: