slim: Fix libpam-meta depends.
[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 = "r1.1"
6
7 inherit update-rc.d
8
9 DEPEND="virtual/x11 libxmu libpng libjpeg libpam freetype"
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://slim-conf.patch;patch=1 \
19   file://ftbfs_gcc_4.4.patch;patch=1 \
20   file://Makefile.patch;patch=1 \
21   file://xauth_secret_support.patch;patch=1 \
22   file://delay.patch;patch=1 \  
23   file://pam-unix2.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 #EXTRA_OEMAKE += "-I${STAGING_INCDIR}/freetype2"
56 #EXTRA_OEMAKE += 'EXTRA_CFLAGS="-I${STAGING_INCDIR}/freetype2"'
57
58 #do_compile_prepend() {
59 #  # respect C[XX]FLAGS, fix crosscompile,
60 #  # fix linking order for --as-needed"
61 #  sed -i -e "s:^CXX=.*:CXX=$(CXX) ${CXXFLAGS}:" \
62 #    -e "s:^CC=.*:CC=$(CC) ${CFLAGS}:" \
63 #    -e "s:^MANDIR=.*:MANDIR=/usr/share/man:" \
64 #    -e "s:^\t\(.*\)\ \$(LDFLAGS)\ \(.*\):\t\1\ \2\ \$(LDFLAGS):g" \
65 #    -r -e "s:^LDFLAGS=(.*):LDFLAGS=\1 ${LDFLAGS}:" \
66 #    Makefile"
67 #}
68
69 do_compile_prepend() {
70   cp -pP ${WORKDIR}/Makefile.oe ${S}/Makefile
71 }
72
73 #  USE_PAM=1 ARCH=${TARGET_ARCH} CROSS_COMPILE=${TARGET_PREFIX} CC=${TARGET_CC} \
74 #               CXX=${TARGET_CXX} DESTDIR=${D} MANDIR=${mandir} PREFIX=${prefix} CFGDIR=${sysconfdir}
75
76 do_install() {
77   oe_runmake install 
78   install -d ${D}${bindir}
79   install -m 0755 ${WORKDIR}/slim-dynwm ${D}${bindir}/
80   install -m 0755 ${WORKDIR}/update_slim_wmlist ${D}${bindir}/
81   install -d ${D}${sysconfdir}/pam.d/  
82   install -m 0644 ${WORKDIR}/slim.pamd ${D}${sysconfdir}/pam.d/slim
83   install -d ${D}${sysconfdir}/init.d/
84   cp -pP ${WORKDIR}/rc.slim ${D}${sysconfdir}/init.d/slim-init
85 }
86
87 INITSCRIPT_NAME = "slim-init"
88 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
89
90 pkg_postinst_${PN} () {
91 # Register SLiM as default DM
92 mkdir -p ${sysconfdir}/X11/
93 echo "${bindir}/slim-dynwm" > ${sysconfdir}/X11/default-display-manager
94 }
95
96 pkg_postrm_${PN} () {
97 sed -i /slim-dynwm/d ${sysconfdir}/X11/default-display-manager || true
98 }