summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid P <megver83@openmailbox.org>2017-03-22 08:59:18 -0300
committerDavid P <megver83@openmailbox.org>2017-03-22 08:59:18 -0300
commitadcf8567dd9794373dc389c1a7313a9ab1d8be41 (patch)
tree3d57bdc1fbbe2d2787e132ade79bef6fb5081af7
parent51b9d0a91ca02a6944aee2b6c0bb9b5dcd00a8b1 (diff)
downloadabslibre-adcf8567dd9794373dc389c1a7313a9ab1d8be41.tar.gz
abslibre-adcf8567dd9794373dc389c1a7313a9ab1d8be41.tar.bz2
abslibre-adcf8567dd9794373dc389c1a7313a9ab1d8be41.zip
Re-added package desktop-privileges
-rw-r--r--pcr/desktop-privileges/10-cpufreqselector.rules5
-rw-r--r--pcr/desktop-privileges/10-udisks.rules5
-rw-r--r--pcr/desktop-privileges/10-udisks2.rules5
-rw-r--r--pcr/desktop-privileges/10-upower.rules6
-rw-r--r--pcr/desktop-privileges/PKGBUILD35
5 files changed, 56 insertions, 0 deletions
diff --git a/pcr/desktop-privileges/10-cpufreqselector.rules b/pcr/desktop-privileges/10-cpufreqselector.rules
new file mode 100644
index 000000000..b17ab2aa6
--- /dev/null
+++ b/pcr/desktop-privileges/10-cpufreqselector.rules
@@ -0,0 +1,5 @@
+polkit.addRule(function(action, subject) {
+ if (action.id == "org.gnome.cpufreqselector" && subject.isInGroup("power")) {
+ return polkit.Result.YES;
+ }
+});
diff --git a/pcr/desktop-privileges/10-udisks.rules b/pcr/desktop-privileges/10-udisks.rules
new file mode 100644
index 000000000..4fef5f496
--- /dev/null
+++ b/pcr/desktop-privileges/10-udisks.rules
@@ -0,0 +1,5 @@
+polkit.addRule(function(action, subject) {
+if (action.id.indexOf("org.freedesktop.udisks.") == 0 && subject.isInGroup("storage")) {
+ return polkit.Result.YES;
+ }
+});
diff --git a/pcr/desktop-privileges/10-udisks2.rules b/pcr/desktop-privileges/10-udisks2.rules
new file mode 100644
index 000000000..af1e1a122
--- /dev/null
+++ b/pcr/desktop-privileges/10-udisks2.rules
@@ -0,0 +1,5 @@
+polkit.addRule(function(action, subject) {
+ if (action.id.indexOf("org.freedesktop.udisks2.") == 0 && subject.isInGroup("storage")) {
+ return polkit.Result.YES;
+ }
+});
diff --git a/pcr/desktop-privileges/10-upower.rules b/pcr/desktop-privileges/10-upower.rules
new file mode 100644
index 000000000..af91947ef
--- /dev/null
+++ b/pcr/desktop-privileges/10-upower.rules
@@ -0,0 +1,6 @@
+polkit.addRule(function(action, subject) {
+ if (action.id == "org.freedesktop.upower.hibernate" ||
+ action.id == "org.freedesktop.upower.suspend") {
+ return polkit.Result.YES;
+ }
+});
diff --git a/pcr/desktop-privileges/PKGBUILD b/pcr/desktop-privileges/PKGBUILD
new file mode 100644
index 000000000..2eea34cf2
--- /dev/null
+++ b/pcr/desktop-privileges/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: David P. <megver83@openmailbox.org>
+# Contributor: Ulf WInkelvos <ulf ät winkelvos dot de>
+# Former Maintainer: anonymous_user <31337h4ck3r at gmail dot com>
+# Former Maintainer: 3V0LU710N <db_eee at hotmail dot com>
+# Contributor: nous at archlinux.us
+
+pkgname=desktop-privileges
+pkgver=0.5
+pkgrel=2
+pkgdesc="A collection of polkit rules to manage automounting of removable media, suspend and hibernate actions and CPU frequency settings."
+arch=('any')
+url="https://aur.archlinux.org/packages/desktop-privileges/"
+license=('GPL')
+depends=('polkit-consolekit' 'udisks2' 'upower' 'pm-utils')
+optdepends=('mate-power-manager-upower')
+conflicts=('polkit-automount-upower-rules')
+replaces=('polkit-automount-upower-rules')
+#install=
+#changelog=
+source=('10-cpufreqselector.rules' '10-udisks.rules' '10-udisks2.rules' '10-upower.rules')
+
+build() {
+true
+}
+
+package() {
+ install -dm755 "${pkgdir}/etc/polkit-1/"
+ install -dm700 "${pkgdir}/etc/polkit-1/rules.d/"
+ install -Dm644 *.rules ${pkgdir}/etc/polkit-1/rules.d/
+}
+
+sha256sums=('681d85042aa06197e00aa54a47d0331f9c8675fdc555321b611a6ec3ab0eb73f'
+ '002ec5fd0592bb9a25321ed4836913cdaa818d3322212bd7d0f315509bda7b62'
+ 'f3f8cb03c13a84cacbc8f1e4517253a009d96335eb648a1253676dac75466766'
+ '805cadc921bce8b11f1f6e170428a7d30fc9377f143df1ff4b0efe0e625a96bf')