summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
authorfreaj <freaj@riseup.net>2015-03-25 19:14:34 +0100
committerfreaj <freaj@riseup.net>2015-03-25 19:14:34 +0100
commit3d9ee3d1faab8fea2cdf06bc766106fe1479ed3c (patch)
tree937f6fbc969605bcb7737c376c6867f5dc75e830 /pcr
parent00ff0f8a71674190bfdb20b081c5d2289557e882 (diff)
consolekit-0.9.2-4: add new package to [pcr]
Diffstat (limited to 'pcr')
-rw-r--r--pcr/consolekit/01-org.freedesktop.ModemManager1.rules6
-rw-r--r--pcr/consolekit/01-org.freedesktop.NetworkManager.settings.modify.system.rules6
-rw-r--r--pcr/consolekit/75-consolekit.rules8
-rw-r--r--pcr/consolekit/PKGBUILD71
-rw-r--r--pcr/consolekit/consolekit.logrotate5
-rw-r--r--pcr/consolekit/consolekit.tmpfiles.conf1
6 files changed, 97 insertions, 0 deletions
diff --git a/pcr/consolekit/01-org.freedesktop.ModemManager1.rules b/pcr/consolekit/01-org.freedesktop.ModemManager1.rules
new file mode 100644
index 000000000..38af2c8de
--- /dev/null
+++ b/pcr/consolekit/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") && subject.active) {
+ return "yes";
+ }
+});
diff --git a/pcr/consolekit/01-org.freedesktop.NetworkManager.settings.modify.system.rules b/pcr/consolekit/01-org.freedesktop.NetworkManager.settings.modify.system.rules
new file mode 100644
index 000000000..ef002c904
--- /dev/null
+++ b/pcr/consolekit/01-org.freedesktop.NetworkManager.settings.modify.system.rules
@@ -0,0 +1,6 @@
+polkit.addRule(function(action, subject) {
+ if (action.id == "org.freedesktop.NetworkManager.settings.modify.system" &&
+ subject.isInGroup("network") && subject.active) {
+ return "yes";
+ }
+});
diff --git a/pcr/consolekit/75-consolekit.rules b/pcr/consolekit/75-consolekit.rules
new file mode 100644
index 000000000..adddfb1bd
--- /dev/null
+++ b/pcr/consolekit/75-consolekit.rules
@@ -0,0 +1,8 @@
+polkit.addRule(function(action, subject) {
+ if (action.id == "org.freedesktop.consolekit.system.stop" ||
+ action.id == "org.freedesktop.consolekit.system.restart" ||
+ action.id == "org.freedesktop.consolekit.system.hibernate" ||
+ action.id == "org.freedesktop.consolekit.system.suspend") {
+ return polkit.Result.YES;
+ }
+});
diff --git a/pcr/consolekit/PKGBUILD b/pcr/consolekit/PKGBUILD
new file mode 100644
index 000000000..42a4a0707
--- /dev/null
+++ b/pcr/consolekit/PKGBUILD
@@ -0,0 +1,71 @@
+# Maintainer : freaj <freaj@riseup.net>
+# Maintainer (Manjaro): artoo <artoo@manjaro.org>
+
+_pkgname=ConsoleKit2
+
+pkgname=consolekit
+pkgver=0.9.2
+pkgrel=4
+pkgdesc="A framework for defining and tracking users, login sessions, and seats"
+arch=('i686' 'x86_64')
+url="https://github.com/ConsoleKit2/ConsoleKit2"
+license=('GPL')
+provides=('logind')
+depends=('dbus' 'dbus-glib' 'libx11' 'polkit' 'udev' 'zlib')
+optdepends=('consolekit-openrc: consolekit openrc initscript')
+makedepends=('xmlto' 'docbook-xsl')
+options=(libtool)
+source=("$url/releases/download/$pkgver/$_pkgname-$pkgver.tar.bz2"
+ 'consolekit.tmpfiles.conf'
+ '75-consolekit.rules'
+ 'consolekit.logrotate'
+ '01-org.freedesktop.ModemManager1.rules'
+ '01-org.freedesktop.NetworkManager.settings.modify.system.rules')
+sha256sums=('102aa07e0960e56740e235bba06a546c8e0e88f47546ef252ecda917935af41f'
+ '778552dc12b3c235bde200e476d4262da0c135f3f6f8b3e975a87881d1f154d1'
+ 'c5159d9fe8fdd52ad0d6a84af7ba00bac09edaae965896ab0d099a4df1c5ea6b'
+ '79735ddd37b8ce6216c78542c2a4e32692dce757c86ecd5771ea8a895a1e8e4d'
+ 'b8c47eb6de2ffbcd533514ecbc660842e072d8ba2bbe601608038ef6bc18dd17'
+ '3d0b6f30de1c91a95429af4fed99e41c8e8db55b45b2f3a17974c5be36c16475')
+
+build(){
+ cd "$srcdir/$_pkgname-$pkgver"
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --sbindir=/usr/bin \
+ --libexecdir=/usr/lib/ConsoleKit \
+ --localstatedir=/var \
+ --enable-polkit \
+ --enable-pam-module \
+ --enable-udev-acl \
+ --enable-docbook-docs \
+ --with-dbus-services=/usr/share/dbus-1/services \
+ --with-logrotate-dir=/etc/logrotate.d \
+ --with-xinitrc-dir=/etc/X11/xinit/xinitrc.d \
+ --with-pam-module-dir=/usr/lib/security \
+ --without-systemdsystemunitdir
+
+ make
+}
+
+package() {
+ cd "$srcdir/$_pkgname-$pkgver"
+ make DESTDIR="$pkgdir" install
+
+ #install -D -m644 data/consolekit.logrotate "$pkgdir"/etc/logrotate.d/consolekit
+ install -D -m644 "$srcdir"/consolekit.logrotate "$pkgdir"/etc/logrotate.d/consolekit
+ install -D -m644 data/90-consolekit "$pkgdir"/etc/X11/xinit/xinitrc.d/90-consolekit.sh
+ chmod +x "$pkgdir"/etc/X11/xinit/xinitrc.d/90-consolekit.sh
+
+ install -D -m644 "$srcdir"/consolekit.tmpfiles.conf "$pkgdir"/usr/lib/tmpfiles.d/consolekit.conf
+
+ rm -rf "${pkgdir}"/var/run
+
+ install -d -m700 $pkgdir/etc/polkit-1/rules.d/
+ install -D -m644 ${srcdir}/75-consolekit.rules $pkgdir/etc/polkit-1/rules.d/25-consolekit.rules
+ install -D -m644 ${srcdir}/01-org.freedesktop.ModemManager1.rules $pkgdir/etc/polkit-1/rules.d/
+ install -D -m644 ${srcdir}/01-org.freedesktop.NetworkManager.settings.modify.system.rules $pkgdir/etc/polkit-1/rules.d/
+
+ chown 102 $pkgdir/etc/polkit-1/rules.d
+}
diff --git a/pcr/consolekit/consolekit.logrotate b/pcr/consolekit/consolekit.logrotate
new file mode 100644
index 000000000..7c5346ef8
--- /dev/null
+++ b/pcr/consolekit/consolekit.logrotate
@@ -0,0 +1,5 @@
+/var/log/ConsoleKit/history {
+ missingok
+ notifempty
+ delaycompress
+}
diff --git a/pcr/consolekit/consolekit.tmpfiles.conf b/pcr/consolekit/consolekit.tmpfiles.conf
new file mode 100644
index 000000000..4ec125110
--- /dev/null
+++ b/pcr/consolekit/consolekit.tmpfiles.conf
@@ -0,0 +1 @@
+d /run/ConsoleKit 0755 - - -