slim_1.3.2.bb 2.4 KB

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