blob: 71359e012c91a4e1497aeb82f59bd199f903aabd [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001DESCRIPTION="Simple Login Manager"
2HOMEPAGE="http://slim.berlios.de"
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b"
5
6PR = "r1"
7
8DEPENDS = "virtual/libx11 libxmu libpng jpeg freetype sessreg ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
9
10SRC_URI = " \
11 http://download.berlios.de/${BPN}/${BP}.tar.gz \
12 file://0002-Fix-image-handling-integer-overflows.patch \
13 file://0003-Fix-build-failure-with-ld-as-needed.patch \
14 file://0004-Add-support-libpng15.patch \
15 file://0005-Remove-path-of-gcc-amd-g-and-version-of-g.patch \
16 file://0006-Remove-localhost-from-Authenticator-of-pam.patch \
17 file://0007-Fix-tty-slowness.patch \
18 file://0008-restart-Xserver-if-killed.patch \
19 file://slim-dynwm \
20 file://update_slim_wmlist \
21 file://Makefile.oe \
22 file://slim.pamd \
23 file://slim.service \
24"
25
26SRC_URI[md5sum] = "ca1ae6120e6f4b4969f2d6cf94f47b42"
27SRC_URI[sha256sum] = "f1560125005f253b9b88220598fed7a9575ef405716862c6ca3fcc72dbd482b8"
28
29
30EXTRA_OEMAKE += " \
31 USE_PAM=${@bb.utils.contains('DISTRO_FEATURES', 'pam', '1', '0', d)} \
32 PREFIX=${prefix} \
33 CFGDIR=${sysconfdir} \
34 MANDIR=${mandir} \
35 DESTDIR=${D} \
36 CFLAGS+=-I${STAGING_INCDIR}/freetype2 \
37 CXXFLAGS+=-I${STAGING_INCDIR}/freetype2 \
38"
39
40do_compile_prepend() {
41 cp -pP ${WORKDIR}/Makefile.oe ${S}/Makefile
42}
43
44do_install() {
45 oe_runmake install
46 install -d ${D}${bindir}
47 install -m 0755 ${WORKDIR}/slim-dynwm ${D}${bindir}/
48 install -m 0755 ${WORKDIR}/update_slim_wmlist ${D}${bindir}/
49 install -d ${D}${sysconfdir}/pam.d/
50 install -m 0644 ${WORKDIR}/slim.pamd ${D}${sysconfdir}/pam.d/slim
51
52 install -d ${D}${systemd_unitdir}/system/
53 install -m 0644 ${WORKDIR}/*.service ${D}${systemd_unitdir}/system/
54
55 echo 'sessionstart_cmd /usr/bin/sessreg -a -l $DISPLAY %user' >> ${D}${sysconfdir}/slim.conf
56 echo 'sessionstop_cmd /usr/bin/sessreg -d -l $DISPLAY %user' >> ${D}${sysconfdir}/slim.conf
57}
58
59
60RDEPENDS_${PN} = "perl xauth freetype sessreg "
61FILES_${PN} += "${systemd_unitdir}/system/"
62
63pkg_postinst_${PN} () {
64if test "x$D" != "x"; then
65 exit 1
66fi
67systemctl enable slim.service
68
69# Register SLiM as default DM
70mkdir -p ${sysconfdir}/X11/
71echo "${bindir}/slim" > ${sysconfdir}/X11/default-display-manager
72}
73
74pkg_postrm_${PN} () {
75if test "x$D" != "x"; then
76 exit 1
77fi
78systemctl disable slim.service
79sed -i /slim/d $D${sysconfdir}/X11/default-display-manager || true
80}
81
82PNBLACKLIST[slim] ?= "does not build with distroless qemuarm as reported in 'State of bitbake world' thread, nobody volunteered to fix them"