summaryrefslogtreecommitdiff
path: root/extra/slim
diff options
context:
space:
mode:
authorroot <root@rshg047.dnsready.net>2011-04-30 22:33:37 +0000
committerroot <root@rshg047.dnsready.net>2011-04-30 22:33:37 +0000
commitc173ac862828a54925737fc1d90ede1dd09a312c (patch)
tree63d6b46455a4abdaf96aef59bbaa4406c6fe04f8 /extra/slim
parent693b5793b8c615601135bc04216a2ca0966087c5 (diff)
Sat Apr 30 22:33:37 UTC 2011
Diffstat (limited to 'extra/slim')
-rw-r--r--extra/slim/PKGBUILD60
-rw-r--r--extra/slim/install7
-rw-r--r--extra/slim/logrotate9
-rw-r--r--extra/slim/pam.d10
-rwxr-xr-xextra/slim/rc.d36
-rw-r--r--extra/slim/sigterm.patch45
6 files changed, 139 insertions, 28 deletions
diff --git a/extra/slim/PKGBUILD b/extra/slim/PKGBUILD
index c468d578f..c8828ee20 100644
--- a/extra/slim/PKGBUILD
+++ b/extra/slim/PKGBUILD
@@ -1,58 +1,62 @@
-# $Id: PKGBUILD 108522 2011-01-31 22:56:10Z bisson $
-# Maintainer: Thayer Williams <thayer@archlinux.org>
+# $Id: PKGBUILD 121225 2011-04-29 15:13:05Z bisson $
+# Maintainer: Gaetan Bisson <bisson@archlinux.org>
+# Contributor: Thayer Williams <thayer@archlinux.org>
# Contributor: Alexander Fehr <pizzapunk gmail com>
# Contributor: Hugo Ideler <hugoideler@dse.nl>
pkgname=slim
pkgver=1.3.2
-pkgrel=3
+pkgrel=4
pkgdesc='Desktop-independent graphical login manager for X11'
arch=('i686' 'x86_64')
url='http://slim.berlios.de/'
license=('GPL2')
depends=('pam' 'libxmu' 'libpng' 'libjpeg' 'libxft')
backup=('etc/slim.conf' 'etc/logrotate.d/slim' 'etc/pam.d/slim')
-install=slim.install
source=("http://download.berlios.de/${pkgname}/${pkgname}-${pkgver}.tar.gz"
- 'slim'
- 'slim.logrotate'
- 'slim.pam'
+ 'rc.d'
+ 'pam.d'
+ 'logrotate'
'gcc44.patch'
- 'tty-slowness.patch'
+ 'no-host.patch'
'restart.patch'
- 'no-host.patch')
+ 'sigterm.patch'
+ 'tty-slowness.patch')
sha1sums=('e421d5487732c8317f8f591906661e014b036358'
'6fe0ba83509af634bce47be34e30995965bffc79'
- 'b969cc902c1d9915a5609141a652c77b2732407b'
'a0e991ef0ac5120465a3be014a26e70ba073b6ae'
+ 'b969cc902c1d9915a5609141a652c77b2732407b'
'51121d451116c768d0fc027ff1ea70aaaef036e7'
- '213fefe8533c845ea8c40585b6a8097820d5e5d2'
+ 'b86eddd083fb9f6259e46c735f55ebe76c655bd3'
'2d526bc0c498bf307ee50e2d22b4f53ffa0c4435'
- 'b86eddd083fb9f6259e46c735f55ebe76c655bd3')
+ '0b35048723c527fb824c5e0f9b9064f751871785'
+ '213fefe8533c845ea8c40585b6a8097820d5e5d2')
+
+install=install
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- sed -i -e 's/png12/png14/g' Makefile
- patch -p1 -i ../gcc44.patch
+ cd "${srcdir}/${pkgname}-${pkgver}"
- patch -p1 -i ../tty-slowness.patch # fix sluggish tty after slim start
- patch -p1 -i ../restart.patch # restart X server if killed
- patch -p1 -i ../no-host.patch # do not set PAM host
+ sed -i -e 's/png12/png14/g' Makefile
+ patch -p1 -i ../gcc44.patch
+ patch -p1 -i ../no-host.patch # do not set PAM host
+ patch -p1 -i ../restart.patch # restart X server if killed
+ patch -p1 -i ../sigterm.patch # do not wait for user input when SIGTERM'd
+ patch -p1 -i ../tty-slowness.patch # fix sluggish TTY after slim start
- make USE_PAM=1
+ make USE_PAM=1
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
+ cd "${srcdir}/${pkgname}-${pkgver}"
- make DESTDIR="${pkgdir}" MANDIR=/usr/share/man install
+ make DESTDIR="${pkgdir}" MANDIR=/usr/share/man install
- install -D -m755 ../slim "${pkgdir}/etc/rc.d/slim"
- install -D -m644 ../slim.logrotate "${pkgdir}/etc/logrotate.d/slim"
- install -D -m644 ../slim.pam "${pkgdir}/etc/pam.d/slim"
+ install -D -m755 ../rc.d "${pkgdir}"/etc/rc.d/slim
+ install -D -m644 ../pam.d "${pkgdir}"/etc/pam.d/slim
+ install -D -m644 ../logrotate "${pkgdir}"/etc/logrotate.d/slim
- # Provide sane defaults
- sed -i 's|#xserver_arguments.*|xserver_arguments -nolisten tcp vt07|' "${pkgdir}/etc/slim.conf"
- sed -i 's|/var/run/slim.lock|/var/lock/slim.lock|' "${pkgdir}/etc/slim.conf"
+ # Provide sane defaults
+ sed -i 's|#xserver_arguments.*|xserver_arguments -nolisten tcp vt07|' "${pkgdir}"/etc/slim.conf
+ sed -i 's|/var/run/slim.lock|/var/lock/slim.lock|' "${pkgdir}"/etc/slim.conf
}
diff --git a/extra/slim/install b/extra/slim/install
new file mode 100644
index 000000000..65aa77d72
--- /dev/null
+++ b/extra/slim/install
@@ -0,0 +1,7 @@
+post_install() {
+ cat <<EOF
+
+==> Add slim to the DAEMONS array in /etc/rc.conf or update /etc/inittab.
+
+EOF
+}
diff --git a/extra/slim/logrotate b/extra/slim/logrotate
new file mode 100644
index 000000000..26ec3b0f4
--- /dev/null
+++ b/extra/slim/logrotate
@@ -0,0 +1,9 @@
+/var/log/slim.log {
+ compress
+ rotate 1
+ size 1024k
+ notifempty
+ missingok
+ copytruncate
+ noolddir
+}
diff --git a/extra/slim/pam.d b/extra/slim/pam.d
new file mode 100644
index 000000000..78a981f74
--- /dev/null
+++ b/extra/slim/pam.d
@@ -0,0 +1,10 @@
+#%PAM-1.0
+auth requisite pam_nologin.so
+auth required pam_env.so
+auth required pam_unix.so
+account required pam_unix.so
+password required pam_unix.so
+session required pam_limits.so
+session required pam_unix.so
+session optional pam_loginuid.so
+session optional pam_ck_connector.so
diff --git a/extra/slim/rc.d b/extra/slim/rc.d
new file mode 100755
index 000000000..b0be7ffc5
--- /dev/null
+++ b/extra/slim/rc.d
@@ -0,0 +1,36 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/bin/slim`
+case "$1" in
+ start)
+ stat_busy "Starting Simple Login Manager"
+ [ -z "$PID" ] && /usr/bin/slim -d &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon slim
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping Simple Login Manager"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon slim
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ sleep 3
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
diff --git a/extra/slim/sigterm.patch b/extra/slim/sigterm.patch
new file mode 100644
index 000000000..fbaeb7116
--- /dev/null
+++ b/extra/slim/sigterm.patch
@@ -0,0 +1,45 @@
+diff -aur old/panel.cpp new/panel.cpp
+--- old/panel.cpp 2011-04-29 15:15:57.210134850 +0200
++++ new/panel.cpp 2011-04-29 15:16:17.260285407 +0200
+@@ -10,6 +10,7 @@
+ */
+
+ #include <sstream>
++#include <poll.h>
+ #include "panel.h"
+
+ using namespace std;
+@@ -288,16 +289,24 @@
+ field=curfield;
+ bool loop = true;
+ OnExpose();
++
++ struct pollfd x11_pfd = {0};
++ x11_pfd.fd = ConnectionNumber(Dpy);
++ x11_pfd.events = POLLIN;
+ while(loop) {
+- XNextEvent(Dpy, &event);
+- switch(event.type) {
+- case Expose:
+- OnExpose();
+- break;
+-
+- case KeyPress:
+- loop=OnKeyPress(event);
+- break;
++ if(XPending(Dpy) || poll(&x11_pfd, 1, -1) > 0) {
++ while(XPending(Dpy)) {
++ XNextEvent(Dpy, &event);
++ switch(event.type) {
++ case Expose:
++ OnExpose();
++ break;
++
++ case KeyPress:
++ loop=OnKeyPress(event);
++ break;
++ }
++ }
+ }
+ }
+