1SUMMARY = "GNOME Display Manager"
2LICENSE="GPL-2.0-only"
3LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
4
5DEPENDS = " \
6    accountsservice \
7    audit \
8    dconf-native \
9    gtk+3 \
10    json-glib \
11    keyutils \
12    libcanberra \
13    libgudev \
14    libpam \
15    xserver-xorg \
16"
17
18REQUIRED_DISTRO_FEATURES = "x11 systemd pam polkit gobject-introspection-data"
19GIR_MESON_OPTION = ""
20
21
22inherit gnomebase gsettings pkgconfig gobject-introspection gettext systemd useradd itstool gnome-help features_check
23
24SRC_URI[archive.sha256sum] = "c5858326bfbcc8ace581352e2be44622dc0e9e5c2801c8690fd2eed502607f84"
25
26PACKAGECONFIG ??= ""
27PACKAGECONFIG[plymouth] = "-Dplymouth=enabled,-Dplymouth=disabled,plymouth"
28
29EXTRA_OEMESON = " \
30    -Ddefault-pam-config=openembedded \
31    -Dpam-mod-dir=${base_libdir}/security \
32"
33
34do_install:prepend() {
35    sed -i -e 's|${B}/||g' ${B}/daemon/gdm-session-worker-enum-types.c
36    sed -i -e 's|${B}/||g' ${B}/daemon/gdm-session-worker-enum-types.h
37    sed -i -e 's|${B}/||g' ${B}/daemon/gdm-session-enum-types.c
38    sed -i -e 's|${B}/||g' ${B}/daemon/gdm-session-enum-types.h
39}
40
41do_install:append() {
42    rm -rf ${D}/run ${D}${localstatedir}/run
43    echo "auth       optional     pam_gnome_keyring.so" >> ${D}${sysconfdir}/pam.d/gdm-password
44    echo "session    optional     pam_gnome_keyring.so auto_start" >> ${D}${sysconfdir}/pam.d/gdm-password
45    install -d ${D}${sysconfdir}/tmpfiles.d
46    echo "d ${localstatedir}/lib/gdm 700 gdm gdm - -" > ${D}${sysconfdir}/tmpfiles.d/gdm.conf
47}
48
49USERADD_PACKAGES = "${PN}"
50USERADD_PARAM:${PN} = "--system --groups video --home ${localstatedir}/lib/gdm  gdm"
51
52SYSTEMD_SERVICE:${PN} = "${BPN}.service"
53
54# Some gnome components - as gnome-panel and gnome-shell (!!) - require gdm
55# components. To allow gnome-images using different display-manager, split them
56# out into a seperate package.
57PACKAGE_BEFORE_PN = "${PN}-base"
58FILES:${PN}-base = " \
59    ${datadir}/glib-2.0 \
60    ${datadir}/gnome-session \
61    ${libdir}/lib*${SOLIBS} \
62    ${libdir}/girepository-1.0 \
63"
64
65CONFFILES:${PN} += "${sysconfdir}/gdm/custom.conf"
66FILES:${PN} += " \
67    ${datadir}/dconf \
68    ${base_libdir}/security/pam_gdm.so \
69    ${systemd_unitdir} ${systemd_user_unitdir} \
70"
71
72RDEPENDS:${PN} += "${PN}-base"
73