d028744551ac9ebdceca0c4a5d2cb9ab90e7f3fa
[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 = "r6"
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://rc.slim \
25   file://slim-dynwm \
26   file://update_slim_wmlist \
27   file://Makefile.oe \  
28   file://slim.pamd \
29 "
30
31 EXTRA_OEMAKE += " \
32   USE_PAM=1 \
33   PREFIX=${prefix} \
34   CFGDIR=${sysconfdir} \
35   MANDIR=${mandir} \
36   DESTDIR=${D} \
37   CFLAGS+=-I${STAGING_INCDIR}/freetype2 \
38   CXXFLAGS+=-I${STAGING_INCDIR}/freetype2 \
39   LDFLAGS+=-lXft \
40   LDFLAGS+=-lX11 \
41   LDFLAGS+=-lfreetype \
42   LDFLAGS+=-lXrender \
43   LDFLAGS+=-lfontconfig \
44   LDFLAGS+=-lpng12 \
45   LDFLAGS+=-lz \
46   LDFLAGS+=-lm \
47   LDFLAGS+=-lcrypt \
48   LDFLAGS+=-lXmu \
49   LDFLAGS+=-lpng \
50   LDFLAGS+=-ljpeg \
51   LDFLAGS+=-lrt \
52   LDFLAGS+=-lpam \
53 "
54
55 do_compile_prepend() {
56   cp -pP ${WORKDIR}/Makefile.oe ${S}/Makefile
57 }
58
59 do_install() {
60   oe_runmake install 
61   install -d ${D}${bindir}
62   install -m 0755 ${WORKDIR}/slim-dynwm ${D}${bindir}/
63   install -m 0755 ${WORKDIR}/update_slim_wmlist ${D}${bindir}/
64   install -d ${D}${sysconfdir}/pam.d/  
65   install -m 0644 ${WORKDIR}/slim.pamd ${D}${sysconfdir}/pam.d/slim
66   install -d ${D}${sysconfdir}/init.d/
67   install -m 0755 ${WORKDIR}/rc.slim ${D}${sysconfdir}/init.d/slim-init
68
69   echo 'sessionstart_cmd    /usr/bin/sessreg -a -l $DISPLAY %user' >> ${D}${sysconfdir}/slim.conf
70   echo 'sessionstop_cmd     /usr/bin/sessreg -d -l $DISPLAY %user' >> ${D}${sysconfdir}/slim.conf
71 }
72
73 INITSCRIPT_NAME = "slim-init"
74 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
75
76 pkg_postinst_${PN} () {
77 # Register SLiM as default DM
78 mkdir -p ${sysconfdir}/X11/
79 echo "${bindir}/slim" > ${sysconfdir}/X11/default-display-manager
80 }
81
82 pkg_postrm_${PN} () {
83 sed -i /slim/d ${sysconfdir}/X11/default-display-manager || true
84 }