summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
Diffstat (limited to 'pcr')
-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/
+}