summaryrefslogtreecommitdiff
path: root/pcr/modemmanager-pk-rules
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2016-10-08 16:28:28 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2016-10-08 16:28:28 -0500
commit5c5bb6aeff5707efc5faad1585db4587cb417696 (patch)
tree3b4987ad86aed2a2a3daa9523b300abb84ceabc0 /pcr/modemmanager-pk-rules
parent3fc256d0977e6e969f43087423b57c8489f24466 (diff)
modemmanager-pk-rules: add new package to [pcr]
Diffstat (limited to 'pcr/modemmanager-pk-rules')
-rw-r--r--pcr/modemmanager-pk-rules/01-org.freedesktop.ModemManager1.rules6
-rw-r--r--pcr/modemmanager-pk-rules/PKGBUILD23
2 files changed, 29 insertions, 0 deletions
diff --git a/pcr/modemmanager-pk-rules/01-org.freedesktop.ModemManager1.rules b/pcr/modemmanager-pk-rules/01-org.freedesktop.ModemManager1.rules
new file mode 100644
index 000000000..6df2427c5
--- /dev/null
+++ b/pcr/modemmanager-pk-rules/01-org.freedesktop.ModemManager1.rules
@@ -0,0 +1,6 @@
+polkit.addRule(function(action, subject) {
+ if (/^org\.freedesktop\.ModemManager1\.(Device\.Control|Contacts|Messaging|Location)$/.test(action.id) &&
+ subject.isInGroup("network")) {
+ return "yes";
+ }
+});
diff --git a/pcr/modemmanager-pk-rules/PKGBUILD b/pcr/modemmanager-pk-rules/PKGBUILD
new file mode 100644
index 000000000..7befa5fc6
--- /dev/null
+++ b/pcr/modemmanager-pk-rules/PKGBUILD
@@ -0,0 +1,23 @@
+# Maintainer (Arch): artoo <artoo@manjaro.org>
+# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>
+
+pkgname=modemmanager-pk-rules
+pkgver=20160402
+pkgrel=1
+pkgdesc="ModemManager polkit rule for non-systemd systems"
+arch=('any')
+groups=('openrc-desktop' 'openrc-mobile')
+license=('GPL')
+url="https://github.com/manjaro/packages-openrc"
+depends=('modemmanager')
+source=('01-org.freedesktop.ModemManager1.rules')
+sha256sums=('17b5e3ead960a0d2c3cea3f1549d1e83ada9600f174ab9a96f083abe6d8f962d')
+
+pkgver() {
+ date +%Y%m%d
+}
+
+package() {
+ install -dm 750 -o polkitd "${pkgdir}"/usr/share/polkit-1/rules.d
+ install -m 644 ${srcdir}/01-org.freedesktop.ModemManager1.rules $pkgdir/usr/share/polkit-1/rules.d/
+}