diff options
author | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
---|---|---|
committer | Parabola <dev@list.parabolagnulinux.org> | 2011-04-05 14:26:38 +0000 |
commit | 415856bdd4f48ab4f2732996f0bae58595092bbe (patch) | |
tree | ede2018b591f6dfb477fe9341ba17b9bc000fab9 /extra/consolekit |
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'extra/consolekit')
-rw-r--r-- | extra/consolekit/PKGBUILD | 35 | ||||
-rw-r--r-- | extra/consolekit/consolekit.logrotate | 5 | ||||
-rw-r--r-- | extra/consolekit/pam-foreground-compat.ck | 16 |
3 files changed, 56 insertions, 0 deletions
diff --git a/extra/consolekit/PKGBUILD b/extra/consolekit/PKGBUILD new file mode 100644 index 000000000..79f9d831a --- /dev/null +++ b/extra/consolekit/PKGBUILD @@ -0,0 +1,35 @@ +# $Id: PKGBUILD 108600 2011-02-01 20:16:14Z ibiru $ +# Maintainer: Jan de Groot <jgc@archlinux.org> +# Contributor: onestep_ua <onestep@ukr.net> + +pkgname=consolekit +pkgver=0.4.3 +pkgrel=2 +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>=0.99' 'zlib' 'libx11>=1.4.1' 'dbus-glib>=0.92') +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) +md5sums=('4c39c6eacc75334b890f21eead1d2945' + 'a8a4de71d9b0549b8143e5f6c2a36fc7' + '6fefa451d9fe2fc6d6269629d3529793') + +build() { + cd "${srcdir}/ConsoleKit-${pkgver}" + ./configure --prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --libexecdir=/usr/lib/ConsoleKit \ + --enable-pam-module \ + --enable-docbook-docs + make + 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 +} diff --git a/extra/consolekit/consolekit.logrotate b/extra/consolekit/consolekit.logrotate new file mode 100644 index 000000000..7c5346ef8 --- /dev/null +++ b/extra/consolekit/consolekit.logrotate @@ -0,0 +1,5 @@ +/var/log/ConsoleKit/history { + missingok + notifempty + delaycompress +} diff --git a/extra/consolekit/pam-foreground-compat.ck b/extra/consolekit/pam-foreground-compat.ck new file mode 100644 index 000000000..7f6b122d5 --- /dev/null +++ b/extra/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 |