blob: 407129dde0f43c8efd5fbb9cc2616e95010458b1 [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"
5SRC_URI = " \
6 ${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}%20${PV}/${BPN}-${PV}.tar.xz \
7 file://lxdm.conf \
8 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'file://lxdm-pam file://lxdm-pam-debug', '', d)} \
9 ${@bb.utils.contains("DISTRO_TYPE", "debug", "", "file://0001-lxdm.conf.in-blacklist-root-for-release-images.patch",d)} \
10 file://0002-let-autotools-create-lxdm.conf.patch \
11"
12SRC_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)}"
19
20# combine oe-core way with angstrom DISTRO_TYPE
21DISTRO_TYPE ?= "${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "debug", "",d)}"
22
23inherit autotools pkgconfig gettext systemd distro_features_check
24# depends on virtual/libx11
25REQUIRED_DISTRO_FEATURES = "x11"
26
27CFLAGS_append = " -fno-builtin-fork -fno-builtin-memset -fno-builtin-strstr "
28
29EXTRA_OECONF += "--enable-gtk3=no --enable-password=yes --with-x -with-xconn=xcb \
30 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/ --disable-consolekit', '--without-systemdsystemunitdir', d)} \
31 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
32"
33
34do_configure_prepend() {
35 cp ${STAGING_DATADIR}/gettext/po/Makefile.in.in ${S}/po/
36}
37
38do_compile_append() {
39 # default background configured not available / no password field available / no default screensaver
40 sed -i -e 's,bg=,# bg=,g' \
41 -e 's,# skip_password=,skip_password=,g' \
42 -e 's,# arg=.*,arg=${bindir}/X -s 0,g' \
43 ${S}/data/lxdm.conf.in
44 # add default configuration
45 oe_runmake -C ${B}/data lxdm.conf
46}
47
48do_install_append() {
49 install -d ${D}${localstatedir}/lib/lxdm
50 install -m 644 ${WORKDIR}/lxdm.conf ${D}${localstatedir}/lib/lxdm
51 if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
52 # ArchLinux version of pam config has the following advantages:
53 # * simple setup of passwordless login
54 # * in XFCE powerdown/restart enabled in logoff dialog
55 install -m 644 ${WORKDIR}/${@bb.utils.contains("DISTRO_TYPE", "debug", "lxdm-pam-debug", "lxdm-pam",d)} ${D}${sysconfdir}/pam.d/lxdm
56 fi
57}
58
59# make installed languages choosable
60pkg_postinst_${PN} () {
61langs=""
62for lang in `find $D${libdir}/locale -maxdepth 1 | grep _ | sort`; do
63lang=`basename $lang`
64if [ "x$langs" = "x" ]; then
65 langs="$lang"
66else
67 langs="$langs $lang"
68fi
69done
70sed -i "s:last_langs=.*$:last_langs=$langs:g" $D${localstatedir}/lib/lxdm/lxdm.conf
71}
72
73RDEPENDS_${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-loginuid', '', d)} setxkbmap bash librsvg-gtk"
74
75RPROVIDES_${PN} += "${PN}-systemd"
76RREPLACES_${PN} += "${PN}-systemd"
77RCONFLICTS_${PN} += "${PN}-systemd"
78SYSTEMD_SERVICE_${PN} = "lxdm.service"