summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD27
3 files changed, 48 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6043d00c953d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+# Generated by mksrcinfo v8
+# Fri Sep 22 09:08:22 UTC 2017
+pkgbase = desktop-privileges-nogroups
+ pkgdesc = A collection of polkit rules to manage automounting of removable media, suspend and hibernate actions and CPU frequency settings.
+ pkgver = 1.0
+ pkgrel = 1
+ url = https://gist.github.com/3886114
+ arch = any
+ license = GPL
+ depends = polkit
+ depends = udisks2
+ depends = upower
+ source = desktop-privileges-nogroups::git+https://gist.github.com/3886114.git
+ sha256sums = SKIP
+
+pkgname = desktop-privileges-nogroups
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..542ade674259
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/src/
+/pkg/
+/*.pkg.tar.xz
+/desktop-privileges-nogroups/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..cdebf71b5805
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Philipp A. <flying-sheep@web.de>
+
+pkgname=desktop-privileges-nogroups
+pkgver=1.0
+pkgrel=1
+pkgdesc="A collection of polkit rules to manage automounting of removable media, suspend and hibernate actions and CPU frequency settings."
+arch=(any)
+url="https://gist.github.com/3886114"
+license=(GPL)
+depends=(polkit udisks2 upower)
+source=("$pkgname::git+$url.git")
+sha256sums=(SKIP)
+
+package() {
+ install -dm755 "$pkgdir/etc/polkit-1/"
+ install -dm750 "$pkgdir/etc/polkit-1/rules.d/"
+
+ for rules in "$srcdir/$pkgname/"*.js; do
+ local path="$(head -n1 "$rules" | sed -E 's|/\* Copy this to ([^ ]+) \*/|\1|')"
+ if [[ "$path" != /etc* ]]; then
+ path="/etc/polkit-1/rules.d/$(basename "$rules" .js).rules"
+ fi
+ install -Dm644 "$rules" "$pkgdir/$path"
+ sed -Ei 's|subject\.user ===? "\w+"|subject.isInGroup("wheel")|' "$pkgdir/$path"
+ done
+}
+