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