1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
11 pkgdesc="Display manager and login screen"
12 url="https://wiki.gnome.org/Projects/GDM"
35 _commit=b622872c5f24960c18900ebf14b5233b8701a8f9 # tags/44.1^0
37 "git+https://gitlab.gnome.org/GNOME/gdm.git#commit=$_commit"
38 0001-Xsession-Don-t-start-ssh-agent-by-default.patch
41 'f7e868fdd7cc121433de1572583eb728f4d186cd4f52c6d6c8f2ccf4a3cf781144ff71f704f13571ddb97a1ff4ec55cfa3df25d38737ad19da21e84ddc2d3ee4')
45 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
51 # https://gitlab.gnome.org/GNOME/gdm/-/issues/730
52 git cherry-pick -n b29510dbc51ccf71a7c0ed656d21634a83766c0c
54 # Don't start ssh-agent by default
55 git apply -3 ../0001-Xsession-Don-t-start-ssh-agent-by-default.patch
60 -D dbus-sys="/usr/share/dbus-1/system.d"
61 -D default-pam-config=arch
62 -D default-path="/usr/local/bin:/usr/local/sbin:/usr/bin"
69 arch-meson gdm build "${meson_options[@]}"
70 meson compile -C build
74 meson test -C build --print-errorlogs
78 local p="$1" f d; shift
80 d="$srcdir/$p/${f#$pkgdir/}"
81 mkdir -p "$(dirname "$d")"
83 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
89 optdepends=('fprintd: fingerprint authentication')
90 backup=(etc/pam.d/gdm-autologin etc/pam.d/gdm-fingerprint etc/pam.d/gdm-launch-environment
91 etc/pam.d/gdm-password etc/pam.d/gdm-smartcard etc/gdm/custom.conf
92 etc/gdm/Xsession etc/gdm/PostSession/Default etc/gdm/PreSession/Default)
96 meson install -C build --destdir "$pkgdir"
100 install -d -o 0 -g 0 -m 0755 var
101 install -d -o 0 -g 0 -m 0755 var/lib
102 install -d -o 120 -g 120 -m 1770 var/lib/gdm
103 install -d -o 120 -g 120 -m 0700 var/lib/gdm/.config
104 install -d -o 120 -g 120 -m 0700 var/lib/gdm/.config/pulse
105 install -d -o 120 -g 120 -m 0700 var/lib/gdm/.local
106 install -d -o 120 -g 120 -m 0755 var/lib/gdm/.local/share
107 install -d -o 120 -g 120 -m 0755 var/lib/gdm/.local/share/applications
109 # https://src.fedoraproject.org/rpms/gdm/blob/master/f/default.pa-for-gdm
110 install -o120 -g120 -m644 /dev/stdin var/lib/gdm/.config/pulse/default.pa <<END
111 load-module module-device-restore
112 load-module module-card-restore
113 load-module module-udev-detect
114 load-module module-native-protocol-unix
115 load-module module-default-device-restore
116 load-module module-always-sink
117 load-module module-intended-roles
118 load-module module-suspend-on-idle
119 load-module module-systemd-login
120 load-module module-position-event-sounds
123 install -Dm644 /dev/stdin usr/lib/sysusers.d/gdm.conf <<END
125 u gdm 120 "Gnome Display Manager" /var/lib/gdm
128 _pick libgdm usr/include
129 _pick libgdm usr/lib/{girepository-1.0,libgdm*,pkgconfig}
130 _pick libgdm usr/share/{gir-1.0,glib-2.0}
134 pkgdesc+=" - support library"
135 depends=(libsystemd.so libg{lib,object,io}-2.0.so)
138 mv libgdm/* "$pkgdir"