slim: improve chvt patch
[openpandora.oe.git] / recipes / slim / slim_1.3.1.bb
1 DESCRIPTION="Simple Login Manager"
2 HOMEPAGE="http://slim.berlios.de"
3 LICENSE = "GPL"
4
5 PR = "r9"
6
7 inherit update-rc.d
8
9 DEPEND="virtual/x11 libxmu libpng libjpeg libpam freetype sessreg"
10
11 RDEPEND="${DEPEND} perl libpam-meta xauth"
12     
13 S = "${WORKDIR}/${PN}-${PV}/"
14
15 SRC_URI=" \
16   http://download.berlios.de/${PN}/${P}.tar.gz \
17   file://fix-manpage.patch;patch=1 \
18   file://ftbfs_gcc_4.4.patch;patch=1 \
19   file://Makefile.patch;patch=1 \
20   file://xauth_secret_support.patch;patch=1 \
21   file://delay.patch;patch=1 \  
22   file://pam-unix2.patch;patch=1 \    
23   file://pandora_xmodmap_hack.patch;patch=1 \
24   file://chvt_on_exit.patch;patch=1 \
25   file://rc.slim \
26   file://slim-dynwm \
27   file://update_slim_wmlist \
28   file://Makefile.oe \  
29   file://slim.pamd \
30 "
31
32 EXTRA_OEMAKE += " \
33   USE_PAM=1 \
34   PREFIX=${prefix} \
35   CFGDIR=${sysconfdir} \
36   MANDIR=${mandir} \
37   DESTDIR=${D} \
38   CFLAGS+=-I${STAGING_INCDIR}/freetype2 \
39   CXXFLAGS+=-I${STAGING_INCDIR}/freetype2 \
40   LDFLAGS+=-lXft \
41   LDFLAGS+=-lX11 \
42   LDFLAGS+=-lfreetype \
43   LDFLAGS+=-lXrender \
44   LDFLAGS+=-lfontconfig \
45   LDFLAGS+=-lpng12 \
46   LDFLAGS+=-lz \
47   LDFLAGS+=-lm \
48   LDFLAGS+=-lcrypt \
49   LDFLAGS+=-lXmu \
50   LDFLAGS+=-lpng \
51   LDFLAGS+=-ljpeg \
52   LDFLAGS+=-lrt \
53   LDFLAGS+=-lpam \
54 "
55
56 do_compile_prepend() {
57   cp -pP ${WORKDIR}/Makefile.oe ${S}/Makefile
58 }
59
60 do_install() {
61   oe_runmake install 
62   install -d ${D}${bindir}
63   install -m 0755 ${WORKDIR}/slim-dynwm ${D}${bindir}/
64   install -m 0755 ${WORKDIR}/update_slim_wmlist ${D}${bindir}/
65   install -d ${D}${sysconfdir}/pam.d/  
66   install -m 0644 ${WORKDIR}/slim.pamd ${D}${sysconfdir}/pam.d/slim
67   install -d ${D}${sysconfdir}/init.d/
68   install -m 0755 ${WORKDIR}/rc.slim ${D}${sysconfdir}/init.d/slim-init
69
70   echo 'sessionstart_cmd    /usr/bin/sessreg -a -l $DISPLAY %user' >> ${D}${sysconfdir}/slim.conf
71   echo 'sessionstop_cmd     /usr/bin/sessreg -d -l $DISPLAY %user' >> ${D}${sysconfdir}/slim.conf
72 }
73
74 INITSCRIPT_NAME = "slim-init"
75 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
76
77 pkg_postinst_${PN} () {
78 # Register SLiM as default DM
79 mkdir -p ${sysconfdir}/X11/
80 echo "${bindir}/slim" > ${sysconfdir}/X11/default-display-manager
81 }
82
83 pkg_postrm_${PN} () {
84 sed -i /slim/d ${sysconfdir}/X11/default-display-manager || true
85 }
86
87 CONFFILES_${PN} += ${sysconfdir}/slim.conf