blob: 8e7efcdada4278fa214f26450c697e9598637c0a [file] [log] [blame]
Patrick Williamsb48b7b42016-08-17 15:04:38 -05001SUMMARY = "LXDM is the lightweight display manager"
2HOMEPAGE = "http://blog.lxde.org/?p=531"
3LICENSE = "GPLv3"
4LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
Brad Bishop6e60e8b2018-02-01 10:27:11 -05005SRC_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://0001-check-for-libexecinfo-providing-backtrace-APIs.patch \
11 "
Patrick Williamsb48b7b42016-08-17 15:04:38 -050012SRC_URI[md5sum] = "061caae432634e6db38bbdc84bc6ffa0"
13SRC_URI[sha256sum] = "4891efee81c72a400cc6703e40aa76f3f3853833d048b72ec805da0f93567f2f"
14
15PE = "1"
16
17DEPENDS = "virtual/libintl intltool-native cairo dbus gdk-pixbuf glib-2.0 gtk+ virtual/libx11 libxcb pango iso-codes"
18DEPENDS += "${@bb.utils.contains("DISTRO_FEATURES", "systemd", "", "consolekit", d)}"
Brad Bishop6e60e8b2018-02-01 10:27:11 -050019DEPENDS_append_libc-musl = " libexecinfo"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050020
21# combine oe-core way with angstrom DISTRO_TYPE
22DISTRO_TYPE ?= "${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "debug", "",d)}"
23
24inherit autotools pkgconfig gettext systemd distro_features_check
25# depends on virtual/libx11
26REQUIRED_DISTRO_FEATURES = "x11"
27
28CFLAGS_append = " -fno-builtin-fork -fno-builtin-memset -fno-builtin-strstr "
Brad Bishop6e60e8b2018-02-01 10:27:11 -050029LDFLAGS_append_libc-musl = " -lexecinfo"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050030
31EXTRA_OECONF += "--enable-gtk3=no --enable-password=yes --with-x -with-xconn=xcb \
32 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/ --disable-consolekit', '--without-systemdsystemunitdir', d)} \
33 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
34"
35
36do_configure_prepend() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050037 cp ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/
Patrick Williamsb48b7b42016-08-17 15:04:38 -050038}
39
40do_compile_append() {
41 # default background configured not available / no password field available / no default screensaver
42 sed -i -e 's,bg=,# bg=,g' \
43 -e 's,# skip_password=,skip_password=,g' \
44 -e 's,# arg=.*,arg=${bindir}/X -s 0,g' \
45 ${S}/data/lxdm.conf.in
46 # add default configuration
47 oe_runmake -C ${B}/data lxdm.conf
48}
49
50do_install_append() {
51 install -d ${D}${localstatedir}/lib/lxdm
52 install -m 644 ${WORKDIR}/lxdm.conf ${D}${localstatedir}/lib/lxdm
53 if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
54 # ArchLinux version of pam config has the following advantages:
55 # * simple setup of passwordless login
56 # * in XFCE powerdown/restart enabled in logoff dialog
57 install -m 644 ${WORKDIR}/${@bb.utils.contains("DISTRO_TYPE", "debug", "lxdm-pam-debug", "lxdm-pam",d)} ${D}${sysconfdir}/pam.d/lxdm
58 fi
59}
60
61# make installed languages choosable
62pkg_postinst_${PN} () {
63langs=""
64for lang in `find $D${libdir}/locale -maxdepth 1 | grep _ | sort`; do
65lang=`basename $lang`
66if [ "x$langs" = "x" ]; then
67 langs="$lang"
68else
69 langs="$langs $lang"
70fi
71done
72sed -i "s:last_langs=.*$:last_langs=$langs:g" $D${localstatedir}/lib/lxdm/lxdm.conf
73}
74
75RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-loginuid', '', d)} setxkbmap bash librsvg-gtk"
76
77RPROVIDES_${PN} += "${PN}-systemd"
78RREPLACES_${PN} += "${PN}-systemd"
79RCONFLICTS_${PN} += "${PN}-systemd"
80SYSTEMD_SERVICE_${PN} = "lxdm.service"