Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=gnometesting.git;a=commitdiff;h=623f4ed6df37034852378bc0f073e84fe234a4e9

commit 623f4ed6df37034852378bc0f073e84fe234a4e9
Author: bouleetbil <bouleet...@frogdev.info>
Date:   Sun Mar 13 20:45:50 2011 +0100

consolekit-0.4.4-3-i686
*Add compatibility script for at_console pam console rule
*remove useless sysvinit script

diff --git a/source/apps/consolekit/FrugalBuild 
b/source/apps/consolekit/FrugalBuild
index d8960cc..bd580a0 100644
--- a/source/apps/consolekit/FrugalBuild
+++ b/source/apps/consolekit/FrugalBuild
@@ -4,19 +4,20 @@
pkgname=consolekit
_F_archive_name="ConsoleKit"
pkgver=0.4.4
-pkgrel=2
+pkgrel=3
pkgdesc="Framework for defining and tracking users, login sessions and seats."
url="http://www.freedesktop.org/wiki/Software/ConsoleKit";
-source=(http://www.freedesktop.org/software/ConsoleKit/dist/$_F_archive_name-$pkgver.tar.bz2
 rc.xconsolekit \
-       consolekit-0.4.0-polkit-automagic.patch)
+source=(http://www.freedesktop.org/software/ConsoleKit/dist/$_F_archive_name-$pkgver.tar.bz2
 \
+       consolekit-0.4.0-polkit-automagic.patch \
+       pam-foreground-compat.ck)
up2date="Flasttar http://www.freedesktop.org/software/ConsoleKit/dist";
depends=('dbus-glib' 'zlib' 'pam' 'polkit>=0.101')
groups=('apps')
archs=('i686' 'x86_64' 'ppc')
Fconfopts="$Fconfopts --enable-pam-module --with-pam-module-dir=/lib/security 
--with-systemdsystemunitdir=/lib/systemd/system"
sha1sums=('163ee0e6308b94dd4712cc64d5a34e8c9007d5d4' \
-          'fee9f121f3c40eb067dc22019d76d30e08e8adef' \
-          '8a72a8f080542c6b0fb586ffd1d92e8330640663')
+          '8a72a8f080542c6b0fb586ffd1d92e8330640663' \
+          '3c70046b2bed512797f41b7d32af1de825bfb30f')

subpkgs=('consolekit-x11')
subdescs=('ConsoleKit X11 support.')
@@ -32,10 +33,9 @@ build() {
Fsed 'shutdown.service' 'shutdown.target' data/*.service.in
Fmake
Fmakeinstall
+       #Add compatibility script for at_console dependant programs
+       Fcp pam-foreground-compat.ck 
usr/lib/ConsoleKit/run-session.d/pam-foreground-compat.ck
Fsplit $pkgname-x11 
/usr/libexec/ck-{collect-session-info,get-x11-display-device,get-x11-server-pid}
-       Frcd2 xconsolekit
-       # don't run old sysv init script with different name when using systemd
-       Fln console-kit-daemon.service /lib/systemd/system/xconsolekit.service
# enable console-kit-daemon.service
Fmkdir /lib/systemd/system/graphical.target.wants
Fln ../console-kit-daemon.service 
/lib/systemd/system/graphical.target.wants/console-kit-daemon.service
diff --git a/source/apps/consolekit/pam-foreground-compat.ck 
b/source/apps/consolekit/pam-foreground-compat.ck
new file mode 100755
index 0000000..5ad5866
--- /dev/null
+++ b/source/apps/consolekit/pam-foreground-compat.ck
@@ -0,0 +1,18 @@
+#!/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/source/apps/consolekit/rc.xconsolekit 
b/source/apps/consolekit/rc.xconsolekit
deleted file mode 100644
index c3d3f51..0000000
--- a/source/apps/consolekit/rc.xconsolekit
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-
-# (c) 2008 bouleetbil <bouleet...@frogdev.info>
-# rc.xconsolekit for FrugalWare
-# distributed under GPL License
-
-# chkconfig: 2345 97 03
-# description: Framework for defining and tracking users, login sessions and 
seats.
-
-source /lib/initscripts/functions
-TEXTDOMAIN=xconsolekit
-TEXTDOMAINDIR=/lib/initscripts/messages
-
-actions=(restart start status stop)
-daemon=$"ConsoleKit Daemon"
-
-pid="pidof console-kit-daemon 2> /dev/null"
-
-rc_start()
-{
-       start_msg
-       if [ -z "$(eval $pid)" ]; then
-               /usr/sbin/console-kit-daemon -- 2>/dev/null 1>/dev/null
-               ok $?
-       else
-               ok 999
-       fi
-}
-
-rc_stop()
-{
-       stop_msg
-       if [ ! -z "$(eval $pid)" ] ;then
-               kill $(eval $pid) 2>/dev/null 1>/dev/null
-               ok $?
-       else
-               ok 999
-       fi
-}
-
-rc_exec $1
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to