1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
8 pkgdesc="Display manager and login screen"
9 url="https://wiki.gnome.org/Projects/GDM"
12 depends=(gnome-shell gnome-session upower xorg-xrdb xorg-server xorg-xhost
13 libxdmcp systemd libcanberra)
14 makedepends=(yelp-tools gobject-introspection git docbook-xsl meson)
17 _commit=afa6f2ef3d34048cd7a3e1a1ec478be2ff464806 # tags/43.0^0
18 source=("git+https://gitlab.gnome.org/GNOME/gdm.git#commit=$_commit"
19 0001-Xsession-Don-t-start-ssh-agent-by-default.patch
20 0002-pam-arch-Remove-user_readenv-1-from-pam_env.patch)
22 '39a7e1189d423dd428ace9baac77ba0442c6706a861d3c3db9eb3a6643e223f8'
23 '7e42077a89a6fcf8b02244b01127af7000a10ed55e09e385eb6fac5aef421c07')
27 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
33 # Don't start ssh-agent by default
34 git apply -3 ../0001-Xsession-Don-t-start-ssh-agent-by-default.patch
36 # https://bugs.archlinux.org/task/68945
37 git apply -3 ../0002-pam-arch-Remove-user_readenv-1-from-pam_env.patch
42 -D dbus-sys="/usr/share/dbus-1/system.d"
43 -D default-pam-config=arch
44 -D default-path="/usr/local/bin:/usr/local/sbin:/usr/bin"
52 arch-meson gdm build "${meson_options[@]}"
53 meson compile -C build
57 meson test -C build --print-errorlogs
61 local p="$1" f d; shift
63 d="$srcdir/$p/${f#$pkgdir/}"
64 mkdir -p "$(dirname "$d")"
66 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
72 optdepends=('fprintd: fingerprint authentication')
73 backup=(etc/pam.d/gdm-autologin etc/pam.d/gdm-fingerprint etc/pam.d/gdm-launch-environment
74 etc/pam.d/gdm-password etc/pam.d/gdm-smartcard etc/gdm/custom.conf
75 etc/gdm/Xsession etc/gdm/PostSession/Default etc/gdm/PreSession/Default)
79 meson install -C build --destdir "$pkgdir"
83 install -d -o 0 -g 0 -m 0755 var
84 install -d -o 0 -g 0 -m 0755 var/lib
85 install -d -o 120 -g 120 -m 1770 var/lib/gdm
86 install -d -o 120 -g 120 -m 0700 var/lib/gdm/.config
87 install -d -o 120 -g 120 -m 0700 var/lib/gdm/.config/pulse
88 install -d -o 120 -g 120 -m 0700 var/lib/gdm/.local
89 install -d -o 120 -g 120 -m 0755 var/lib/gdm/.local/share
90 install -d -o 120 -g 120 -m 0755 var/lib/gdm/.local/share/applications
92 # https://src.fedoraproject.org/rpms/gdm/blob/master/f/default.pa-for-gdm
93 install -o120 -g120 -m644 /dev/stdin var/lib/gdm/.config/pulse/default.pa <<END
94 load-module module-device-restore
95 load-module module-card-restore
96 load-module module-udev-detect
97 load-module module-native-protocol-unix
98 load-module module-default-device-restore
99 load-module module-always-sink
100 load-module module-intended-roles
101 load-module module-suspend-on-idle
102 load-module module-systemd-login
103 load-module module-position-event-sounds
106 install -Dm644 /dev/stdin usr/lib/sysusers.d/gdm.conf <<END
108 u gdm 120 "Gnome Display Manager" /var/lib/gdm
111 _pick libgdm usr/include
112 _pick libgdm usr/lib/{girepository-1.0,libgdm*,pkgconfig}
113 _pick libgdm usr/share/{gir-1.0,glib-2.0}
117 pkgdesc+=" - support library"
118 depends=(libsystemd.so libg{lib,object,io}-2.0.so)
121 mv libgdm/* "$pkgdir"