summaryrefslogtreecommitdiff
path: root/testing/consolekit
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-04-11 00:01:18 +0000
committerroot <root@rshg054.dnsready.net>2012-04-11 00:01:18 +0000
commit04aff5f70cb7c04abe06ca8eaf8261cbb0eeb378 (patch)
tree4935a4f0959f9560df7fba4989a0de1dc361884e /testing/consolekit
parent223ca251f3ce07eb5484be845e631d6ca645b263 (diff)
Wed Apr 11 00:01:18 UTC 2012
Diffstat (limited to 'testing/consolekit')
-rw-r--r--testing/consolekit/PKGBUILD46
-rw-r--r--testing/consolekit/consolekit.logrotate5
-rw-r--r--testing/consolekit/consolekit.tmpfiles.conf1
-rw-r--r--testing/consolekit/pam-foreground-compat.ck16
4 files changed, 68 insertions, 0 deletions
diff --git a/testing/consolekit/PKGBUILD b/testing/consolekit/PKGBUILD
new file mode 100644
index 000000000..8576a741b
--- /dev/null
+++ b/testing/consolekit/PKGBUILD
@@ -0,0 +1,46 @@
+# $Id: PKGBUILD 155918 2012-04-09 13:20:09Z tomegun $
+# Maintainer: Jan de Groot <jgc@archlinux.org>
+# Contributor: onestep_ua <onestep@ukr.net>
+
+pkgname=consolekit
+pkgver=0.4.6
+pkgrel=1
+pkgdesc="A framework for defining and tracking users, login sessions, and seats"
+arch=('i686' 'x86_64')
+url="http://www.freedesktop.org/wiki/Software/ConsoleKit"
+license=('GPL')
+depends=('polkit' 'zlib' 'libx11' 'dbus-glib')
+makedepends=('pkgconfig' 'xmlto' 'docbook-xsl')
+options=(!libtool)
+source=(http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-$pkgver.tar.bz2
+ pam-foreground-compat.ck consolekit.logrotate consolekit.tmpfiles.conf)
+
+build() {
+ cd "$srcdir/ConsoleKit-$pkgver"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --libexecdir=/usr/lib/ConsoleKit \
+ --with-systemdsystemunitdir=/usr/lib/systemd/system \
+ --enable-pam-module \
+ --enable-docbook-docs \
+ --enable-udev-acl
+ make
+}
+
+package() {
+ cd "$srcdir/ConsoleKit-$pkgver"
+ make DESTDIR="$pkgdir" install
+ install -m755 "$srcdir/pam-foreground-compat.ck" "$pkgdir/usr/lib/ConsoleKit/run-session.d/"
+
+ # install the logrotate config
+ install -D -m644 "$srcdir/consolekit.logrotate" "$pkgdir/etc/logrotate.d/consolekit"
+
+ install -D -m644 "$srcdir/consolekit.tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/consolekit.conf"
+
+ rm -rf "${pkgdir}/var/run"
+}
+md5sums=('810990b607e338f06a6396c92b8a4a06'
+ 'a8a4de71d9b0549b8143e5f6c2a36fc7'
+ '6fefa451d9fe2fc6d6269629d3529793'
+ '8c5a8059db515d40fae1379daf084094')
diff --git a/testing/consolekit/consolekit.logrotate b/testing/consolekit/consolekit.logrotate
new file mode 100644
index 000000000..7c5346ef8
--- /dev/null
+++ b/testing/consolekit/consolekit.logrotate
@@ -0,0 +1,5 @@
+/var/log/ConsoleKit/history {
+ missingok
+ notifempty
+ delaycompress
+}
diff --git a/testing/consolekit/consolekit.tmpfiles.conf b/testing/consolekit/consolekit.tmpfiles.conf
new file mode 100644
index 000000000..4ec125110
--- /dev/null
+++ b/testing/consolekit/consolekit.tmpfiles.conf
@@ -0,0 +1 @@
+d /run/ConsoleKit 0755 - - -
diff --git a/testing/consolekit/pam-foreground-compat.ck b/testing/consolekit/pam-foreground-compat.ck
new file mode 100644
index 000000000..7f6b122d5
--- /dev/null
+++ b/testing/consolekit/pam-foreground-compat.ck
@@ -0,0 +1,16 @@
+#!/bin/sh
+TAGDIR=/var/run/console
+
+[ -n "$CK_SESSION_USER_UID" ] || exit 1
+
+TAGFILE="$TAGDIR/`getent passwd $CK_SESSION_USER_UID | cut -f 1 -d:`"
+
+if [ "$1" = "session_added" ]; then
+ mkdir -p "$TAGDIR"
+ echo "$CK_SESSION_ID" >> "$TAGFILE"
+fi
+
+if [ "$1" = "session_removed" ] && [ -e "$TAGFILE" ]; then
+ sed -i "\%^$CK_SESSION_ID\$%d" "$TAGFILE"
+ [ -s "$TAGFILE" ] || rm -f "$TAGFILE"
+fi