Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | DESCRIPTION="Simple Login Manager" |
| 2 | HOMEPAGE="http://slim.berlios.de" |
| 3 | LICENSE = "GPLv2+" |
| 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=8ca43cbc842c2336e835926c2166c28b" |
| 5 | |
| 6 | PR = "r1" |
| 7 | |
| 8 | DEPENDS = "virtual/libx11 libxmu libpng jpeg freetype sessreg ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" |
| 9 | |
| 10 | SRC_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 | |
| 26 | SRC_URI[md5sum] = "ca1ae6120e6f4b4969f2d6cf94f47b42" |
| 27 | SRC_URI[sha256sum] = "f1560125005f253b9b88220598fed7a9575ef405716862c6ca3fcc72dbd482b8" |
| 28 | |
| 29 | |
| 30 | EXTRA_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 | |
| 40 | do_compile_prepend() { |
| 41 | cp -pP ${WORKDIR}/Makefile.oe ${S}/Makefile |
| 42 | } |
| 43 | |
| 44 | do_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 | |
| 60 | RDEPENDS_${PN} = "perl xauth freetype sessreg " |
| 61 | FILES_${PN} += "${systemd_unitdir}/system/" |
| 62 | |
| 63 | pkg_postinst_${PN} () { |
| 64 | if test "x$D" != "x"; then |
| 65 | exit 1 |
| 66 | fi |
| 67 | systemctl enable slim.service |
| 68 | |
| 69 | # Register SLiM as default DM |
| 70 | mkdir -p ${sysconfdir}/X11/ |
| 71 | echo "${bindir}/slim" > ${sysconfdir}/X11/default-display-manager |
| 72 | } |
| 73 | |
| 74 | pkg_postrm_${PN} () { |
| 75 | if test "x$D" != "x"; then |
| 76 | exit 1 |
| 77 | fi |
| 78 | systemctl disable slim.service |
| 79 | sed -i /slim/d $D${sysconfdir}/X11/default-display-manager || true |
| 80 | } |
| 81 | |
| 82 | PNBLACKLIST[slim] ?= "does not build with distroless qemuarm as reported in 'State of bitbake world' thread, nobody volunteered to fix them" |