diff --git a/srcpkgs/ConsoleKit/ConsoleKit-devel.template b/srcpkgs/ConsoleKit/ConsoleKit-devel.template index 6e575c38d01..da6523fed85 100644 --- a/srcpkgs/ConsoleKit/ConsoleKit-devel.template +++ b/srcpkgs/ConsoleKit/ConsoleKit-devel.template @@ -6,6 +6,7 @@ long_desc="${long_desc} This package contains files for development, headers, static libs, etc." Add_dependency run ConsoleKit +Add_dependency run polkit-devel do_install() { diff --git a/srcpkgs/ConsoleKit/ConsoleKit-x11.template b/srcpkgs/ConsoleKit/ConsoleKit-x11.template index 8a89e66ded5..642950c5045 100644 --- a/srcpkgs/ConsoleKit/ConsoleKit-x11.template +++ b/srcpkgs/ConsoleKit/ConsoleKit-x11.template @@ -10,6 +10,7 @@ Add_dependency run libX11 do_install() { - mkdir -p ${DESTDIR}/usr - mv ${SRCPKGDESTDIR}/usr/libexec ${DESTDIR}/usr + mkdir -p ${DESTDIR}/usr/lib/ConsoleKit + mv ${SRCPKGDESTDIR}/usr/lib/ConsoleKit/ck* \ + ${DESTDIR}/usr/lib/ConsoleKit } diff --git a/srcpkgs/ConsoleKit/depends b/srcpkgs/ConsoleKit/depends index 56f78eaacaf..fed1cb2e2e1 100644 --- a/srcpkgs/ConsoleKit/depends +++ b/srcpkgs/ConsoleKit/depends @@ -1,2 +1,2 @@ -abi_depends=">=0.3.0" +abi_depends=">=0.4.1" api_depends="${abi_depends}" diff --git a/srcpkgs/ConsoleKit/files/pam-foreground-compat.ck b/srcpkgs/ConsoleKit/files/pam-foreground-compat.ck new file mode 100644 index 00000000000..7f6b122d5fc --- /dev/null +++ b/srcpkgs/ConsoleKit/files/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 diff --git a/srcpkgs/ConsoleKit/template b/srcpkgs/ConsoleKit/template index 376c44be63a..1c737b742cb 100644 --- a/srcpkgs/ConsoleKit/template +++ b/srcpkgs/ConsoleKit/template @@ -1,29 +1,34 @@ # Template file for 'ConsoleKit' pkgname=ConsoleKit -version=0.3.0 +version=0.4.1 distfiles="http://www.freedesktop.org/software/$pkgname/dist/$pkgname-$version.tar.bz2" build_style=gnu_configure -configure_args="--disable-docbook-docs --enable-pam-module --localstatedir=/var" +configure_args="--enable-docbook-docs --enable-pam-module + --libexecdir=/usr/lib/ConsoleKit --localstatedir=/var" short_desc="Framework for defining and tracking users, login sessions and seats" maintainer="Juan RP " -checksum=cbcfbb3df2dc76855c99c1cdff04a257ec5270fa62e1d21b0d057b08d88c0fd4 +checksum=f032adc6146d745034315054c5822a7a09f30e20a40d6e802221fa977354403e long_desc=" ConsoleKit is a framework for keeping track of the various users, sessions, and seats present on a system. It provides a mechanism for software to react - to changes of any of these items or of any of the metadata associated with + to changes of any of these items or of any of the metadata associated with them." conf_files="/etc/dbus-1/system.d/ConsoleKit.conf /etc/ConsoleKit/seats.d/00-primary.seat" subpackages="$pkgname-devel $pkgname-x11" -Add_dependency full glibc -Add_dependency full dbus -Add_dependency full dbus-glib -Add_dependency full glib +Add_dependency full polkit Add_dependency full zlib -Add_dependency full pam -Add_dependency full PolicyKit -Add_dependency full readline Add_dependency build libX11 Add_dependency build pkg-config +Add_dependency build xmlto + +post_install() +{ + install -d ${DESTDIR}/usr/lib/ConsoleKit/run-session.d + install -m755 ${FILESDIR}/pam-foreground-compat.ck \ + ${DESTDIR}/usr/lib/ConsoleKit/run-session.d + install -d ${DESTDIR}/etc/ConsoleKit/run-seat.d + install -d ${DESTDIR}/etc/ConsoleKit/run-session.d +}