[Pkg-xfce-commits] r5943 - goodies/trunk/lightdm/debian
Yves-Alexis Perez
corsac at alioth.debian.org
Thu Aug 25 08:39:50 UTC 2011
Author: corsac
Date: 2011-08-25 20:39:49 +0000 (Thu, 25 Aug 2011)
New Revision: 5943
Added:
goodies/trunk/lightdm/debian/lightdm-gtk-greeter.config
goodies/trunk/lightdm/debian/lightdm-gtk-greeter.postinst
goodies/trunk/lightdm/debian/lightdm-gtk-greeter.prerm
goodies/trunk/lightdm/debian/lightdm-gtk-greeter.templates
goodies/trunk/lightdm/debian/lightdm-qt-greeter.config
goodies/trunk/lightdm/debian/lightdm-qt-greeter.postinst
goodies/trunk/lightdm/debian/lightdm-qt-greeter.prerm
goodies/trunk/lightdm/debian/lightdm-qt-greeter.templates
Modified:
goodies/trunk/lightdm/debian/changelog
Log:
* debian/lightdm-{gtk,qt}-greeter.{config,templates,postinst,prerm}:
- provide a way to select the current greeter through debconf. Other
packages providing a greeter use the same templates/config to register
themselves in debconf.
Modified: goodies/trunk/lightdm/debian/changelog
===================================================================
--- goodies/trunk/lightdm/debian/changelog 2011-08-25 16:11:59 UTC (rev 5942)
+++ goodies/trunk/lightdm/debian/changelog 2011-08-25 20:39:49 UTC (rev 5943)
@@ -11,6 +11,10 @@
solved.
* debian/lightdm.install
- install lightdm-set-default and dm-tool there.
+ * debian/lightdm-{gtk,qt}-greeter.{config,templates,postinst,prerm}:
+ - provide a way to select the current greeter through debconf. Other
+ packages providing a greeter use the same templates/config to register
+ themselves in debconf.
-- Yves-Alexis Perez <corsac at debian.org> Tue, 09 Aug 2011 20:55:24 +0200
Added: goodies/trunk/lightdm/debian/lightdm-gtk-greeter.config
===================================================================
--- goodies/trunk/lightdm/debian/lightdm-gtk-greeter.config (rev 0)
+++ goodies/trunk/lightdm/debian/lightdm-gtk-greeter.config 2011-08-25 20:39:49 UTC (rev 5943)
@@ -0,0 +1,31 @@
+#!/bin/sh
+# Debian lightdm package configuration script
+# based on xdm script
+# Copyright 2000-2001 Branden Robinson.
+# Licensed under the GNU General Public License, version 2. See the file
+# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
+
+set -e
+
+LIGHTDM_CONF=/etc/lightdm/lightdm.conf
+
+# source debconf library
+. /usr/share/debconf/confmodule
+
+OWNERS=
+if db_metaget shared/lightdm-greeter owners; then
+ OWNERS="$RET"
+fi
+
+CHOICES=
+if db_metaget shared/lightdm-greeter choices; then
+ CHOICES="$RET"
+fi
+
+if [ "$OWNERS" != "$CHOICES" ]; then
+ db_subst shared/lightdm-greeter choices "$OWNERS" || :
+ db_fset shared/lightdm-greeter seen false || :
+fi
+
+db_input high shared/lightdm-greeter || :
+db_go || :
Added: goodies/trunk/lightdm/debian/lightdm-gtk-greeter.postinst
===================================================================
--- goodies/trunk/lightdm/debian/lightdm-gtk-greeter.postinst (rev 0)
+++ goodies/trunk/lightdm/debian/lightdm-gtk-greeter.postinst 2011-08-25 20:39:49 UTC (rev 5943)
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# using this greeter?
+GREETER=
+if db_get shared/lightdm-greeter; then
+ GREETER="$RET"
+fi
+
+if [ -n "${GREETER}" ];
+then
+ LIGHTDM_SET_DEFAULTS=/usr/lib/lightdm/lightdm-set-defaults
+ if [ -x "${LIGHTDM_SET_DEFAULTS}" ];
+ then
+ "${LIGHTDM_SET_DEFAULTS}" --greeter "${GREETER}"
+ fi
+fi
+db_stop || true
+
+#DEBHELPER#
+
+exit 0
Added: goodies/trunk/lightdm/debian/lightdm-gtk-greeter.prerm
===================================================================
--- goodies/trunk/lightdm/debian/lightdm-gtk-greeter.prerm (rev 0)
+++ goodies/trunk/lightdm/debian/lightdm-gtk-greeter.prerm 2011-08-25 20:39:49 UTC (rev 5943)
@@ -0,0 +1,46 @@
+#!/bin/bash
+# Debian lightdm package pre-removal script
+# © 2010 Yves-Alexis Perez, using lightdm script which is
+# Copyright 2001 Branden Robinson.
+# Licensed under the GNU General Public License, version 2. See the file
+# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
+# Acknowlegements to Stephen Early, Mark Eichin, and Manoj Srivastava.
+
+set -e
+
+THIS_PACKAGE="lightdm-gtk-greeter"
+LIGHTDM_SET_DEFAULTS=/usr/lib/lightdm/lightdm-set-defaults
+
+if [ "$1" = "remove" -o "$1" = "deconfigure" ]; then
+ if [ -e /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+ # disown this question
+ db_unregister shared/lightdm-greeter || true
+ # does the question still exist?
+ if db_get shared/lightdm-greeter; then
+ db_metaget shared/lightdm-greeter owners
+ db_subst shared/lightdm-greeter choices "$RET"
+ db_get shared/lightdm-greeter
+ # are we removing the currently selected lightdm greeter?
+ if [ "$THIS_PACKAGE" = "$RET" ]; then
+ # ask the user to choose a new default
+ db_fset shared/lightdm-greeter seen false
+ db_input critical shared/lightdm-greeter || true
+ db_go
+
+ GREETER=
+ if db_get shared/lightdm-greeter; then
+ GREETER="$RET"
+ fi
+ if [ -n "${GREETER}" ] && [ -x "${LIGHTDM_SET_DEFAULTS}" ];
+ then
+ "${LIGHTDM_SET_DEFAULTS}" --greeter "${GREETER}"
+ fi
+ fi
+ fi
+ fi
+fi
+
+#DEBHELPER#
+
+exit 0
Added: goodies/trunk/lightdm/debian/lightdm-gtk-greeter.templates
===================================================================
--- goodies/trunk/lightdm/debian/lightdm-gtk-greeter.templates (rev 0)
+++ goodies/trunk/lightdm/debian/lightdm-gtk-greeter.templates 2011-08-25 20:39:49 UTC (rev 5943)
@@ -0,0 +1,11 @@
+Template: lightdm-gtk-greeter/lightdm-greeter
+Type: string
+Default: lightdm-gtk-greeter
+Description: for internal use only
+
+Template: shared/lightdm-greeter
+Type: select
+Choices: ${choices}
+_Description: Default LightDM greeter
+ LightDM can use multiple greeter fitting more or less with various Desktop
+ environments. Select the one which fits best with your install.
Added: goodies/trunk/lightdm/debian/lightdm-qt-greeter.config
===================================================================
--- goodies/trunk/lightdm/debian/lightdm-qt-greeter.config (rev 0)
+++ goodies/trunk/lightdm/debian/lightdm-qt-greeter.config 2011-08-25 20:39:49 UTC (rev 5943)
@@ -0,0 +1,31 @@
+#!/bin/sh
+# Debian lightdm package configuration script
+# based on xdm script
+# Copyright 2000-2001 Branden Robinson.
+# Licensed under the GNU General Public License, version 2. See the file
+# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
+
+set -e
+
+LIGHTDM_CONF=/etc/lightdm/lightdm.conf
+
+# source debconf library
+. /usr/share/debconf/confmodule
+
+OWNERS=
+if db_metaget shared/lightdm-greeter owners; then
+ OWNERS="$RET"
+fi
+
+CHOICES=
+if db_metaget shared/lightdm-greeter choices; then
+ CHOICES="$RET"
+fi
+
+if [ "$OWNERS" != "$CHOICES" ]; then
+ db_subst shared/lightdm-greeter choices "$OWNERS" || :
+ db_fset shared/lightdm-greeter seen false || :
+fi
+
+db_input high shared/lightdm-greeter || :
+db_go || :
Added: goodies/trunk/lightdm/debian/lightdm-qt-greeter.postinst
===================================================================
--- goodies/trunk/lightdm/debian/lightdm-qt-greeter.postinst (rev 0)
+++ goodies/trunk/lightdm/debian/lightdm-qt-greeter.postinst 2011-08-25 20:39:49 UTC (rev 5943)
@@ -0,0 +1,25 @@
+#!/bin/sh
+
+set -e
+
+. /usr/share/debconf/confmodule
+
+# using this greeter?
+GREETER=
+if db_get shared/lightdm-greeter; then
+ GREETER="$RET"
+fi
+
+if [ -n "${GREETER}" ];
+then
+ LIGHTDM_SET_DEFAULTS=/usr/lib/lightdm/lightdm-set-defaults
+ if [ -x "${LIGHTDM_SET_DEFAULTS}" ];
+ then
+ "${LIGHTDM_SET_DEFAULTS}" --greeter "${GREETER}"
+ fi
+fi
+db_stop || true
+
+#DEBHELPER#
+
+exit 0
Added: goodies/trunk/lightdm/debian/lightdm-qt-greeter.prerm
===================================================================
--- goodies/trunk/lightdm/debian/lightdm-qt-greeter.prerm (rev 0)
+++ goodies/trunk/lightdm/debian/lightdm-qt-greeter.prerm 2011-08-25 20:39:49 UTC (rev 5943)
@@ -0,0 +1,46 @@
+#!/bin/bash
+# Debian lightdm package pre-removal script
+# © 2010 Yves-Alexis Perez, using lightdm script which is
+# Copyright 2001 Branden Robinson.
+# Licensed under the GNU General Public License, version 2. See the file
+# /usr/share/common-licenses/GPL or <http://www.gnu.org/copyleft/gpl.txt>.
+# Acknowlegements to Stephen Early, Mark Eichin, and Manoj Srivastava.
+
+set -e
+
+THIS_PACKAGE="lightdm-qt-greeter"
+LIGHTDM_SET_DEFAULTS=/usr/lib/lightdm/lightdm-set-defaults
+
+if [ "$1" = "remove" -o "$1" = "deconfigure" ]; then
+ if [ -e /usr/share/debconf/confmodule ]; then
+ . /usr/share/debconf/confmodule
+ # disown this question
+ db_unregister shared/lightdm-greeter || true
+ # does the question still exist?
+ if db_get shared/lightdm-greeter; then
+ db_metaget shared/lightdm-greeter owners
+ db_subst shared/lightdm-greeter choices "$RET"
+ db_get shared/lightdm-greeter
+ # are we removing the currently selected lightdm greeter?
+ if [ "$THIS_PACKAGE" = "$RET" ]; then
+ # ask the user to choose a new default
+ db_fset shared/lightdm-greeter seen false
+ db_input critical shared/lightdm-greeter || true
+ db_go
+
+ GREETER=
+ if db_get shared/lightdm-greeter; then
+ GREETER="$RET"
+ fi
+ if [ -n "${GREETER}" ] && [ -x "${LIGHTDM_SET_DEFAULTS}" ];
+ then
+ "${LIGHTDM_SET_DEFAULTS}" --greeter "${GREETER}"
+ fi
+ fi
+ fi
+ fi
+fi
+
+#DEBHELPER#
+
+exit 0
Added: goodies/trunk/lightdm/debian/lightdm-qt-greeter.templates
===================================================================
--- goodies/trunk/lightdm/debian/lightdm-qt-greeter.templates (rev 0)
+++ goodies/trunk/lightdm/debian/lightdm-qt-greeter.templates 2011-08-25 20:39:49 UTC (rev 5943)
@@ -0,0 +1,11 @@
+Template: lightdm-qt-greeter/lightdm-greeter
+Type: string
+Default: qt-greeter
+Description: for internal use only
+
+Template: shared/lightdm-greeter
+Type: select
+Choices: ${choices}
+_Description: Default LightDM greeter
+ LightDM can use multiple greeter fitting more or less with various Desktop
+ environments. Select the one which fits best with your install.
More information about the Pkg-xfce-commits
mailing list