1*4882a593SmuzhiyunSUMMARY = "LXDM is the lightweight display manager" 2*4882a593SmuzhiyunHOMEPAGE = "http://blog.lxde.org/?p=531" 3*4882a593SmuzhiyunLICENSE = "GPL-3.0-only" 4*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504" 5*4882a593SmuzhiyunSRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}%20${PV}/${BPN}-${PV}.tar.xz \ 6*4882a593Smuzhiyun file://lxdm.conf \ 7*4882a593Smuzhiyun ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'file://lxdm-pam file://lxdm-pam-debug', '', d)} \ 8*4882a593Smuzhiyun ${@bb.utils.contains("DISTRO_TYPE", "debug", "", "file://0001-lxdm.conf.in-blacklist-root-for-release-images.patch",d)} \ 9*4882a593Smuzhiyun file://0002-let-autotools-create-lxdm.conf.patch \ 10*4882a593Smuzhiyun file://0003-check-for-libexecinfo-providing-backtrace-APIs.patch \ 11*4882a593Smuzhiyun file://0004-fix-css-under-gtk-3.20.patch \ 12*4882a593Smuzhiyun file://0001-greeter-set-visible-when-switch-to-input-user.patch \ 13*4882a593Smuzhiyun file://0002-greeter-gdk.c-fix-typo.patch \ 14*4882a593Smuzhiyun file://0003-check-whether-password-expired-with-pam.patch \ 15*4882a593Smuzhiyun file://0004-lxdm.c-add-function-to-change-password-with-pam.patch \ 16*4882a593Smuzhiyun file://0005-ui.c-handle-password-expire-and-update-new-password.patch \ 17*4882a593Smuzhiyun file://0006-themes-Industrial-add-info-label-in-ui.patch \ 18*4882a593Smuzhiyun file://0007-greeter.c-support-to-update-expired-password.patch \ 19*4882a593Smuzhiyun file://0008-greeter.c-show-information-on-gtk-label-info.patch \ 20*4882a593Smuzhiyun file://0009-greeter.c-disallow-empty-new-password.patch \ 21*4882a593Smuzhiyun file://0001-systemd-lxdm.service-remove-plymouth-quit-conflicts.patch \ 22*4882a593Smuzhiyun " 23*4882a593SmuzhiyunSRC_URI[md5sum] = "061caae432634e6db38bbdc84bc6ffa0" 24*4882a593SmuzhiyunSRC_URI[sha256sum] = "4891efee81c72a400cc6703e40aa76f3f3853833d048b72ec805da0f93567f2f" 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunPE = "1" 27*4882a593Smuzhiyun 28*4882a593SmuzhiyunDEPENDS = "virtual/libintl intltool-native cairo dbus gdk-pixbuf glib-2.0 gtk+3 virtual/libx11 libxcb pango iso-codes" 29*4882a593SmuzhiyunDEPENDS += "${@bb.utils.contains("DISTRO_FEATURES", "systemd", "", "consolekit", d)}" 30*4882a593SmuzhiyunDEPENDS:append:libc-musl = " libexecinfo" 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun# combine oe-core way with angstrom DISTRO_TYPE 33*4882a593SmuzhiyunDISTRO_TYPE ?= "${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "debug", "",d)}" 34*4882a593Smuzhiyun 35*4882a593Smuzhiyuninherit autotools pkgconfig gettext systemd features_check 36*4882a593Smuzhiyun# depends on virtual/libx11 37*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES = "x11" 38*4882a593Smuzhiyun 39*4882a593SmuzhiyunCFLAGS:append = " -fno-builtin-fork -fno-builtin-memset -fno-builtin-strstr " 40*4882a593SmuzhiyunLDFLAGS:append:libc-musl = " -lexecinfo" 41*4882a593Smuzhiyun 42*4882a593SmuzhiyunEXTRA_OECONF += "--enable-gtk3=yes --enable-password=yes --with-x -with-xconn=xcb \ 43*4882a593Smuzhiyun ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/ --disable-consolekit', '--without-systemdsystemunitdir', d)} \ 44*4882a593Smuzhiyun ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \ 45*4882a593Smuzhiyun" 46*4882a593Smuzhiyun 47*4882a593Smuzhiyundo_configure:prepend() { 48*4882a593Smuzhiyun cp ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/ 49*4882a593Smuzhiyun} 50*4882a593Smuzhiyun 51*4882a593Smuzhiyundo_compile:append() { 52*4882a593Smuzhiyun # default background configured not available / no password field available / no default screensaver 53*4882a593Smuzhiyun sed -i -e 's,bg=,# bg=,g' \ 54*4882a593Smuzhiyun -e 's,# skip_password=,skip_password=,g' \ 55*4882a593Smuzhiyun -e 's,# arg=.*,arg=${bindir}/X -s 0,g' \ 56*4882a593Smuzhiyun ${S}/data/lxdm.conf.in 57*4882a593Smuzhiyun # add default configuration 58*4882a593Smuzhiyun oe_runmake -C ${B}/data lxdm.conf 59*4882a593Smuzhiyun} 60*4882a593Smuzhiyun 61*4882a593Smuzhiyundo_install:append() { 62*4882a593Smuzhiyun install -d ${D}${localstatedir}/lib/lxdm 63*4882a593Smuzhiyun install -m 644 ${WORKDIR}/lxdm.conf ${D}${localstatedir}/lib/lxdm 64*4882a593Smuzhiyun if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then 65*4882a593Smuzhiyun # ArchLinux version of pam config has the following advantages: 66*4882a593Smuzhiyun # * simple setup of passwordless login 67*4882a593Smuzhiyun # * in XFCE powerdown/restart enabled in logoff dialog 68*4882a593Smuzhiyun install -m 644 ${WORKDIR}/${@bb.utils.contains("DISTRO_TYPE", "debug", "lxdm-pam-debug", "lxdm-pam",d)} ${D}${sysconfdir}/pam.d/lxdm 69*4882a593Smuzhiyun fi 70*4882a593Smuzhiyun} 71*4882a593Smuzhiyun 72*4882a593Smuzhiyun# make installed languages choosable 73*4882a593Smuzhiyunpkg_postinst:${PN} () { 74*4882a593Smuzhiyunlangs="" 75*4882a593Smuzhiyunfor lang in `find $D${libdir}/locale -maxdepth 1 | grep _ | sort`; do 76*4882a593Smuzhiyunlang=`basename $lang` 77*4882a593Smuzhiyunif [ "x$langs" = "x" ]; then 78*4882a593Smuzhiyun langs="$lang" 79*4882a593Smuzhiyunelse 80*4882a593Smuzhiyun langs="$langs $lang" 81*4882a593Smuzhiyunfi 82*4882a593Smuzhiyundone 83*4882a593Smuzhiyunsed -i "s:last_langs=.*$:last_langs=$langs:g" $D${localstatedir}/lib/lxdm/lxdm.conf 84*4882a593Smuzhiyun} 85*4882a593Smuzhiyun 86*4882a593SmuzhiyunRDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-loginuid', '', d)} setxkbmap bash librsvg-gtk" 87*4882a593Smuzhiyun 88*4882a593SmuzhiyunRPROVIDES:${PN} += "${PN}-systemd" 89*4882a593SmuzhiyunRREPLACES:${PN} += "${PN}-systemd" 90*4882a593SmuzhiyunRCONFLICTS:${PN} += "${PN}-systemd" 91*4882a593SmuzhiyunSYSTEMD_SERVICE:${PN} = "lxdm.service" 92