summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lambiris2019-03-22 08:25:58 -0400
committerTony Lambiris2019-03-22 08:25:58 -0400
commit51eaac6a718681fe30427d61e9529a5bf2f9929d (patch)
treedf7f756f80b4dbc122b83859fa2be2a149a55f03
downloadaur-51eaac6a718681fe30427d61e9529a5bf2f9929d.tar.gz
Initial commit
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD41
-rw-r--r--add-gnome-3.32-support.patch14
-rw-r--r--caffeine-plus.install24
4 files changed, 96 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..804a25cc299
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = gnome-shell-extension-caffeine-plus-git
+ pkgdesc = Disable screensaver and auto suspend
+ pkgver = r181.83b4ad0
+ pkgrel = 1
+ url = https://github.com/qunxyz/gnome-shell-extension-caffeine
+ install = caffeine-plus.install
+ arch = any
+ license = GPL3
+ makedepends = git
+ depends = gnome-shell
+ source = gnome-shell-extension-caffeine-plus-git::git+https://github.com/qunxyz/gnome-shell-extension-caffeine.git
+ source = add-gnome-3.32-support.patch
+ sha256sums = SKIP
+ sha256sums = 878673dc9bd181cbd93312709eb62753a13c76ab9729cad752f8bc49467fbe8a
+
+pkgname = gnome-shell-extension-caffeine-plus-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..039b0b61bc2
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: Tony Lambiris <tony@criticalstack.com>
+
+pkgname=gnome-shell-extension-caffeine-plus-git
+pkgver=r181.83b4ad0
+pkgrel=1
+pkgdesc="Disable screensaver and auto suspend"
+arch=('any')
+url="https://github.com/qunxyz/gnome-shell-extension-caffeine"
+install=caffeine-plus.install
+license=('GPL3')
+depends=('gnome-shell')
+makedepends=('git')
+source=("${pkgname}::git+https://github.com/qunxyz/gnome-shell-extension-caffeine.git"
+ "add-gnome-3.32-support.patch")
+sha256sums=('SKIP'
+ '878673dc9bd181cbd93312709eb62753a13c76ab9729cad752f8bc49467fbe8a')
+
+pkgver() {
+ cd "${pkgname}"
+
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "${pkgname}"
+
+ patch -Np1 < "${srcdir}/add-gnome-3.32-support.patch"
+}
+
+build() {
+ cd "${pkgname}"
+
+ /bin/bash -ex ./build.sh
+}
+
+package() {
+ cd "${pkgname}"
+
+ install -dm755 "${pkgdir}/usr/share/gnome-shell/extensions"
+ cp -a "caffeine-plus@patapon.info" "${pkgdir}/usr/share/gnome-shell/extensions"
+}
diff --git a/add-gnome-3.32-support.patch b/add-gnome-3.32-support.patch
new file mode 100644
index 00000000000..995fc83ed13
--- /dev/null
+++ b/add-gnome-3.32-support.patch
@@ -0,0 +1,14 @@
+diff --git a/caffeine-plus@patapon.info/metadata.json b/caffeine-plus@patapon.info/metadata.json
+index 58258e6..bfa85ef 100644
+--- a/caffeine-plus@patapon.info/metadata.json
++++ b/caffeine-plus@patapon.info/metadata.json
+@@ -13,7 +13,8 @@
+ "3.26",
+ "3.28",
+ "3.29",
+- "3.30"
++ "3.30",
++ "3.32"
+ ],
+ "uuid": "caffeine-plus@patapon.info",
+ "name": "Caffeine-Plus",
diff --git a/caffeine-plus.install b/caffeine-plus.install
new file mode 100644
index 00000000000..19bbbb3c8b7
--- /dev/null
+++ b/caffeine-plus.install
@@ -0,0 +1,24 @@
+post_install() {
+ instructions_install
+}
+
+post_upgrade() {
+ instructions_upgrade
+}
+
+instructions_install() {
+ cat <<-EOT
+
+ Restart GNOME Shell ([Alt]+[F2], r).
+ Activate the extension with gnome-tweak-tool.
+
+ EOT
+}
+
+instructions_upgrade() {
+ cat <<-EOT
+
+ Restart GNOME Shell ([Alt]+[F2], r) to load the upgraded extension.
+
+ EOT
+}