summaryrefslogtreecommitdiff
path: root/community/lxdm
diff options
context:
space:
mode:
Diffstat (limited to 'community/lxdm')
-rw-r--r--community/lxdm/PKGBUILD14
-rw-r--r--community/lxdm/lxdm.install56
2 files changed, 11 insertions, 59 deletions
diff --git a/community/lxdm/PKGBUILD b/community/lxdm/PKGBUILD
index e93d30b6e..12462f625 100644
--- a/community/lxdm/PKGBUILD
+++ b/community/lxdm/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 57777 2011-11-02 15:28:31Z ibiru $
+# $Id: PKGBUILD 57938 2011-11-04 18:07:05Z bpiotrowski $
# Maintainer: Bartłomiej Piotrowski <barthalion@gmail.com>
# Contributor: AndyRTR <andyrtr@archlinux.org>
# Contributor: kiefer <jorgelmadrid@gmail.com>
pkgname=lxdm
pkgver=0.4.1
-pkgrel=4
+pkgrel=5
pkgdesc="Lightweight Display Manager (part of LXDE)"
arch=('i686' 'x86_64')
url="http://sourceforge.net/projects/lxdm/"
@@ -26,7 +26,7 @@ md5sums=('8da1cfc2be6dc9217c85a7cf51e1e821'
'705f394052fdd0dec22e95321d170de0')
build() {
- cd $srcdir/$pkgname-$pkgver
+ cd "$srcdir/$pkgname-$pkgver"
./configure --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib/lxdm
make
@@ -36,18 +36,12 @@ build() {
package() {
- cd $srcdir/$pkgname-$pkgver
+ 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
- # on 0.4.1 this sed have to changed since they changed the default path
sed -i -e "s/local\/libexec/lib\/lxdm/" ${pkgdir}/etc/lxdm/lxdm.conf
}
diff --git a/community/lxdm/lxdm.install b/community/lxdm/lxdm.install
index 8d42de90f..522f9e3b1 100644
--- a/community/lxdm/lxdm.install
+++ b/community/lxdm/lxdm.install
@@ -1,59 +1,17 @@
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
+ getent group lxdm > /dev/null 2>&1 || groupadd -g 121 lxdm
+ getent passwd lxdm > /dev/null 2>&1 || useradd -c 'LXDE Display Manager' -u 121 -g lxdm -d /var/lib/lxdm -s /sbin/nologin lxdm
+ passwd -l lxdm > /dev/null
+ chown -R lxdm:lxdm /var/lib/lxdm > /dev/null
}
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_install
}
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
+ getent passwd lxdm > /dev/null 2>&1 && userdel lxdm
+ getent group lxdm > /dev/null 2>&1 && groupdel lxdm
}