summaryrefslogtreecommitdiff
path: root/community/lxdm
diff options
context:
space:
mode:
authorNicolas Reynolds <fauno@kiwwwi.com.ar>2011-06-10 14:38:26 -0300
committerNicolas Reynolds <fauno@kiwwwi.com.ar>2011-06-10 14:38:26 -0300
commitf5e137fdf748b757bacfc50577e5d48a693d31c4 (patch)
treec75bdfef17b69eff3b8bb20b285c880d7f9183c0 /community/lxdm
parent300b3ee60aef9cfa0a32f5c69aa5e25ad637285f (diff)
parentdd5222c4ae447eb7a6bda08ec5a3c2339852dc16 (diff)
Merge branch 'master' of ssh://vparabola/home/parabola/abslibre-pre-mips64el
Conflicts: community/chntpw/PKGBUILD community/hardinfo/PKGBUILD community/obconf/obconf.install community/xplc/PKGBUILD community/zziplib/PKGBUILD core/rp-pppoe/PKGBUILD extra/icedtea-web/PKGBUILD extra/icon-naming-utils/PKGBUILD extra/lxmenu-data/PKGBUILD extra/openbox/PKGBUILD extra/phonon-xine/PKGBUILD extra/qt/PKGBUILD extra/zope-interface/PKGBUILD libre/pacman/PKGBUILD libre/pacman/pacman.conf.mips64el libre/pacman/rePKGBUILD testing/coreutils/PKGBUILD testing/net-tools/PKGBUILD
Diffstat (limited to 'community/lxdm')
-rw-r--r--community/lxdm/PKGBUILD49
-rw-r--r--community/lxdm/Xsession.patch14
-rw-r--r--community/lxdm/lxdm-daemon36
-rw-r--r--community/lxdm/lxdm-pam.patch8
-rw-r--r--community/lxdm/lxdm.install59
-rw-r--r--community/lxdm/lxdm.patch26
6 files changed, 192 insertions, 0 deletions
diff --git a/community/lxdm/PKGBUILD b/community/lxdm/PKGBUILD
new file mode 100644
index 000000000..1663cf998
--- /dev/null
+++ b/community/lxdm/PKGBUILD
@@ -0,0 +1,49 @@
+# $Id: PKGBUILD 49034 2011-06-09 21:26:14Z andrea $
+# Maintainer: AndyRTR <andyrtr@archlinux.org>
+# Contributor: kiefer <jorgelmadrid@gmail.com>
+
+pkgname=lxdm
+pkgver=0.3.0
+pkgrel=1
+pkgdesc="Lightweight Display Manager (part of LXDE)"
+arch=('i686' 'x86_64' 'mips64el')
+url="http://sourceforge.net/projects/lxdm/"
+license=('GPL')
+groups=('lxde')
+depends=('gtk2' 'xorg-server' 'consolekit')
+makedepends=('intltool')
+install=${pkgname}.install
+backup=('etc/lxdm/lxdm.conf') # 'etc/lxdm/xinitrc')
+source=("http://downloads.sourceforge.net/lxde/$pkgname-$pkgver.tar.gz"
+ Xsession.patch lxdm.patch lxdm-pam.patch lxdm-daemon)
+md5sums=('1d0688e088edab7c3c563263eb2f9654'
+ '9bdf95adb74d81d4b6b6176fb1142090'
+ 'baed9055e8825a5511712bc095197519'
+ 'b20fe3c8487a039050986d60e45233a9'
+ '705f394052fdd0dec22e95321d170de0')
+
+build() {
+ cd $srcdir/$pkgname-$pkgver
+ ./configure --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib/lxdm
+ make
+
+ patch -Np0 < ../lxdm.patch
+ patch -Np0 < ../Xsession.patch
+}
+
+
+package() {
+ cd $srcdir/$pkgname-$pkgver
+ make DESTDIR="${pkgdir}" install
+
+ install -m644 ${srcdir}/lxdm-pam.patch ${pkgdir}/etc/pam.d/lxdm
+ install -Dm755 ${srcdir}/lxdm-daemon ${pkgdir}/etc/rc.d/lxdm
+
+ # these files are not in the package, but should be owned by lxdm - taken from Fedora pkg
+# touch ${pkgdir}/etc/lxdm/xinitrc
+ install -d ${pkgdir}/var/{lib,run}/lxdm
+# touch ${pkgdir}/var/lib/lxdm/lxdm.conf
+
+ # fix the greeter location
+ sed -i -e "s/libexec/lib\/lxdm/" ${pkgdir}/etc/lxdm/lxdm.conf
+}
diff --git a/community/lxdm/Xsession.patch b/community/lxdm/Xsession.patch
new file mode 100644
index 000000000..a9ba63233
--- /dev/null
+++ b/community/lxdm/Xsession.patch
@@ -0,0 +1,14 @@
+--- data/Xsession.orig 2010-01-31 20:48:08.695677408 -0200
++++ data/Xsession 2010-01-31 20:47:48.260223292 -0200
+@@ -2,6 +2,11 @@
+
+ # use bash for "exec -l", howto run login shell by /bin/sh ?
+
++[[ -f /etc/profile ]] && . /etc/profile
++[[ -f "$HOME/.profile" ]] && . "$HOME/.profile"
++[[ -f /etc/xprofile ]] && . /etc/xprofile
++[[ -f "$HOME/.xprofile" ]] && . "$HOME/.xprofile"
++
+ if [ $# -eq 1 -a -n "$1" ]; then
+ LXSESSION=$1
+ else
diff --git a/community/lxdm/lxdm-daemon b/community/lxdm/lxdm-daemon
new file mode 100644
index 000000000..68eb6225d
--- /dev/null
+++ b/community/lxdm/lxdm-daemon
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=$(pidof -o %PPID `which lxdm-binary`)
+case "$1" in
+ start)
+ stat_busy "Starting LXDM Display Manager"
+ [ -z "$PID" ] && /usr/sbin/lxdm -d &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon lxdm
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping LXDM Display Manager"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon lxdm
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/community/lxdm/lxdm-pam.patch b/community/lxdm/lxdm-pam.patch
new file mode 100644
index 000000000..3f5df04a7
--- /dev/null
+++ b/community/lxdm/lxdm-pam.patch
@@ -0,0 +1,8 @@
+#%PAM-1.0
+auth requisite pam_nologin.so
+auth required pam_env.so
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_limits.so
+session required pam_unix.so
+password required pam_unix.so
diff --git a/community/lxdm/lxdm.install b/community/lxdm/lxdm.install
new file mode 100644
index 000000000..8d42de90f
--- /dev/null
+++ b/community/lxdm/lxdm.install
@@ -0,0 +1,59 @@
+pkgname=lxdm
+
+post_install() {
+ # make sure the group and user "lxdm" exist on this system and have the correct values
+ if grep -q "^lxdm:" /etc/group &> /dev/null ; then
+ groupmod -g 121 -n lxdm lxdm &> /dev/null
+ else
+ groupadd -g 121 lxdm &> /dev/null
+ fi
+
+ if grep -q "^lxdm:" /etc/passwd 2> /dev/null ; then
+ usermod -s /sbin/nologin -c "LXDE Display Manager user" -d /var/lib/lxdm -u 121 -g lxdm lxdm &> /dev/null
+ else
+ useradd -s /sbin/nologin -c "LXDE Display Manager user" -d /var/lib/lxdm -u 121 -g lxdm -m -r lxdm &> /dev/null
+ fi
+ passwd -l lxdm > /dev/null
+
+# chown root:lxdm /etc/lxdm/{lxdm.conf,xinitrc} > /dev/null
+ chown root:lxdm /etc/lxdm/lxdm.conf > /dev/null
+ chown -R root:lxdm /var/lib/lxdm > /dev/null
+ chown -R root:lxdm /var/run/lxdm > /dev/null
+
+cat << EOF
+>>> To make the LXDM as your default DM,
+>>> put, 'lxdm' or '@lxdm' (without quotes) on DAEMONS in /etc/rc.conf
+>>>
+>>> You can also use /etc/inittab,
+>>> just add 'x:5:respawn:/usr/sbin/lxdm >& /dev/null' (without quotes)
+>>> in the end of the file /etc/inittab
+>>> and uncoment the line on the top 'id:5:initdefault:'.
+EOF
+}
+
+post_upgrade() {
+ # make sure the group and user "lxdm" exist on this system and have the correct values
+ if grep -q "^lxdm:" /etc/group &> /dev/null ; then
+ groupmod -g 121 -n lxdm lxdm &> /dev/null
+ else
+ groupadd -g 121 lxdm &> /dev/null
+ fi
+
+ if grep -q "^lxdm:" /etc/passwd 2> /dev/null ; then
+ usermod -s /sbin/nologin -c "LXDE Display Manager user" -d /var/lib/lxdm -u 121 -g lxdm lxdm &> /dev/null
+ else
+ useradd -s /sbin/nologin -c "LXDE Display Manager user" -d /var/lib/lxdm -u 121 -g lxdm -m -r lxdm &> /dev/null
+ fi
+ passwd -l lxdm > /dev/null
+
+# chown root:lxdm /etc/lxdm/{lxdm.conf,xinitrc} > /dev/null
+ chown root:lxdm /etc/lxdm/lxdm.conf > /dev/null
+ chown -R root:lxdm /var/lib/lxdm > /dev/null
+ chown -R root:lxdm /var/run/lxdm > /dev/null
+}
+
+post_remove() {
+ # Removing lxdm group+user
+ getent passwd lxdm >/dev/null 2>&1 && userdel lxdm #|| /bin/true
+ getent group lxdm >/dev/null 2>&1 && groupdel lxdm #|| /bin/true
+}
diff --git a/community/lxdm/lxdm.patch b/community/lxdm/lxdm.patch
new file mode 100644
index 000000000..a703a386d
--- /dev/null
+++ b/community/lxdm/lxdm.patch
@@ -0,0 +1,26 @@
+--- data/lxdm.orig 2010-01-24 16:58:42.262866825 -0200
++++ data/lxdm 2010-01-19 11:56:34.308668692 -0200
+@@ -1,21 +1,13 @@
+ #!/bin/sh
+
+-[ -f /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
+-
+-if [ -z "$LANG" -a -e /etc/sysconfig/language ]; then
+- . /etc/sysconfig/language
+- if [ -n "$RC_LANG"]; then
+- LANG=$RC_LANG
+- fi
++if [ -r /etc/profile.d/locale.sh ]; then
++ . /etc/profile.d/locale.sh
+ fi
+
+ if [ -n "$LANG" ]; then
+ export LANG
+ fi
+
+-[ -f /etc/sysconfig/desktop ] && . /etc/sysconfig/desktop
+-[ -f /etc/sysconfig/windowmanager ] && . /etc/sysconfig/windowmanager
+-
+ if [ -n "$DEFAULT_WM" ]; then
+ PREFERRED=$DEFAULT_WM
+ fi