blob: 2a8a8859b7d51f1ce1ddceaaa7e61c6c346d665a [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 \
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080010 file://0003-check-for-libexecinfo-providing-backtrace-APIs.patch \
11 file://0004-fix-css-under-gtk-3.20.patch \
Andrew Geisslerac970dd2021-02-12 15:32:45 -060012 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 \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050021 "
Patrick Williamsb48b7b42016-08-17 15:04:38 -050022SRC_URI[md5sum] = "061caae432634e6db38bbdc84bc6ffa0"
23SRC_URI[sha256sum] = "4891efee81c72a400cc6703e40aa76f3f3853833d048b72ec805da0f93567f2f"
24
25PE = "1"
26
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080027DEPENDS = "virtual/libintl intltool-native cairo dbus gdk-pixbuf glib-2.0 gtk+3 virtual/libx11 libxcb pango iso-codes"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050028DEPENDS += "${@bb.utils.contains("DISTRO_FEATURES", "systemd", "", "consolekit", d)}"
Patrick Williams213cb262021-08-07 19:21:33 -050029DEPENDS:append:libc-musl = " libexecinfo"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050030
31# combine oe-core way with angstrom DISTRO_TYPE
32DISTRO_TYPE ?= "${@bb.utils.contains("IMAGE_FEATURES", "debug-tweaks", "debug", "",d)}"
33
Brad Bishop8410d612019-11-25 09:40:59 -050034inherit autotools pkgconfig gettext systemd features_check
Patrick Williamsb48b7b42016-08-17 15:04:38 -050035# depends on virtual/libx11
36REQUIRED_DISTRO_FEATURES = "x11"
37
Patrick Williams213cb262021-08-07 19:21:33 -050038CFLAGS:append = " -fno-builtin-fork -fno-builtin-memset -fno-builtin-strstr "
39LDFLAGS:append:libc-musl = " -lexecinfo"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050040
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080041EXTRA_OECONF += "--enable-gtk3=yes --enable-password=yes --with-x -with-xconn=xcb \
Patrick Williamsb48b7b42016-08-17 15:04:38 -050042 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/ --disable-consolekit', '--without-systemdsystemunitdir', d)} \
43 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '--with-pam', '--without-pam', d)} \
44"
45
Patrick Williams213cb262021-08-07 19:21:33 -050046do_configure:prepend() {
Brad Bishopd7bf8c12018-02-25 22:55:05 -050047 cp ${STAGING_DATADIR_NATIVE}/gettext/po/Makefile.in.in ${S}/po/
Patrick Williamsb48b7b42016-08-17 15:04:38 -050048}
49
Patrick Williams213cb262021-08-07 19:21:33 -050050do_compile:append() {
Patrick Williamsb48b7b42016-08-17 15:04:38 -050051 # default background configured not available / no password field available / no default screensaver
52 sed -i -e 's,bg=,# bg=,g' \
53 -e 's,# skip_password=,skip_password=,g' \
54 -e 's,# arg=.*,arg=${bindir}/X -s 0,g' \
55 ${S}/data/lxdm.conf.in
56 # add default configuration
57 oe_runmake -C ${B}/data lxdm.conf
58}
59
Patrick Williams213cb262021-08-07 19:21:33 -050060do_install:append() {
Patrick Williamsb48b7b42016-08-17 15:04:38 -050061 install -d ${D}${localstatedir}/lib/lxdm
62 install -m 644 ${WORKDIR}/lxdm.conf ${D}${localstatedir}/lib/lxdm
63 if ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'true', 'false', d)}; then
64 # ArchLinux version of pam config has the following advantages:
65 # * simple setup of passwordless login
66 # * in XFCE powerdown/restart enabled in logoff dialog
67 install -m 644 ${WORKDIR}/${@bb.utils.contains("DISTRO_TYPE", "debug", "lxdm-pam-debug", "lxdm-pam",d)} ${D}${sysconfdir}/pam.d/lxdm
68 fi
69}
70
71# make installed languages choosable
Patrick Williams213cb262021-08-07 19:21:33 -050072pkg_postinst:${PN} () {
Patrick Williamsb48b7b42016-08-17 15:04:38 -050073langs=""
74for lang in `find $D${libdir}/locale -maxdepth 1 | grep _ | sort`; do
75lang=`basename $lang`
76if [ "x$langs" = "x" ]; then
77 langs="$lang"
78else
79 langs="$langs $lang"
80fi
81done
82sed -i "s:last_langs=.*$:last_langs=$langs:g" $D${localstatedir}/lib/lxdm/lxdm.conf
83}
84
Patrick Williams213cb262021-08-07 19:21:33 -050085RDEPENDS:${PN} = "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-loginuid', '', d)} setxkbmap bash librsvg-gtk"
Patrick Williamsb48b7b42016-08-17 15:04:38 -050086
Patrick Williams213cb262021-08-07 19:21:33 -050087RPROVIDES:${PN} += "${PN}-systemd"
88RREPLACES:${PN} += "${PN}-systemd"
89RCONFLICTS:${PN} += "${PN}-systemd"
90SYSTEMD_SERVICE:${PN} = "lxdm.service"