archrelease: copy trunk to extra-x86_64
[arch-packages.git] / gdm / repos / extra-x86_64 / PKGBUILD
blob2c1bc61fed17b7bad5d3d3ee8ac698a2ba630424
1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
2 # Contributor: Jan de Groot <jgc@archlinux.org>
4 pkgbase=gdm
5 pkgname=(gdm libgdm)
6 pkgver=41.0+r15+g23ebe617
7 pkgrel=1
8 pkgdesc="Display manager and login screen"
9 url="https://wiki.gnome.org/Projects/GDM"
10 arch=(x86_64)
11 license=(GPL)
12 depends=(gnome-shell gnome-session upower xorg-xrdb xorg-server xorg-xhost
13          libxdmcp systemd)
14 makedepends=(yelp-tools gobject-introspection git docbook-xsl meson)
15 checkdepends=(check)
16 _commit=23ebe617119506a0614f1bd2c76cd9bcf7e8fb7c  # main
17 source=("git+https://gitlab.gnome.org/GNOME/gdm.git#commit=$_commit"
18         0001-Xsession-Don-t-start-ssh-agent-by-default.patch
19         0002-pam-arch-Drop-pam_faillock-counting-from-fingerprint.patch
20         default.pa)
21 sha256sums=('SKIP'
22             '39a7e1189d423dd428ace9baac77ba0442c6706a861d3c3db9eb3a6643e223f8'
23             'e3dcaaa5ffa2dd4d3338c8b5827965ea2ca1efd9a95d7272a107e6121cb7898f'
24             'e88410bcec9e2c7a22a319be0b771d1f8d536863a7fc618b6352a09d61327dcb')
26 pkgver() {
27   cd gdm
28   git describe --tags | sed 's/\.rc/rc/;s/[^-]*-g/r&/;s/-/+/g'
31 prepare() {
32   cd gdm
34   # https://bugs.archlinux.org/task/67485
35   git cherry-pick -n 8528a503ad70669a5f0c03d0a92ba19326983b82
37   # Don't start ssh-agent by default
38   git apply -3 ../0001-Xsession-Don-t-start-ssh-agent-by-default.patch
40   # https://bugs.archlinux.org/task/71750
41   git apply -3 ../0002-pam-arch-Drop-pam_faillock-counting-from-fingerprint.patch
44 build() {
45   arch-meson gdm build \
46     -D dbus-sys="/usr/share/dbus-1/system.d" \
47     -D default-pam-config=arch \
48     -D default-path="/usr/local/bin:/usr/local/sbin:/usr/bin" \
49     -D gdm-xsession=true \
50     -D ipv6=true \
51     -D plymouth=disabled \
52     -D run-dir=/run/gdm \
53     -D selinux=disabled
54   meson compile -C build
57 check() {
58   meson test -C build --print-errorlogs
61 package_gdm() {
62   depends+=(libgdm)
63   optdepends=('fprintd: fingerprint authentication')
64   backup=(etc/pam.d/gdm-autologin etc/pam.d/gdm-fingerprint etc/pam.d/gdm-launch-environment
65           etc/pam.d/gdm-password etc/pam.d/gdm-smartcard etc/gdm/custom.conf
66           etc/gdm/Xsession etc/gdm/PostSession/Default etc/gdm/PreSession/Default)
67   groups=(gnome)
68   install=gdm.install
70   meson install -C build --destdir "$pkgdir"
72   install -d "$pkgdir/var/lib"
73   install -d "$pkgdir/var/lib/gdm"                           -o120 -g120 -m1770
74   install -d "$pkgdir/var/lib/gdm/.config"                   -o120 -g120 -m700
75   install -d "$pkgdir/var/lib/gdm/.config/pulse"             -o120 -g120 -m700
76   install -d "$pkgdir/var/lib/gdm/.local"                    -o120 -g120 -m700
77   install -d "$pkgdir/var/lib/gdm/.local/share"              -o120 -g120
78   install -d "$pkgdir/var/lib/gdm/.local/share/applications" -o120 -g120
80   # https://src.fedoraproject.org/rpms/gdm/blob/master/f/default.pa-for-gdm
81   install -t "$pkgdir/var/lib/gdm/.config/pulse" -o120 -g120 -m644 default.pa
83   install -Dm644 /dev/stdin "$pkgdir/usr/lib/sysusers.d/gdm.conf" <<END
84 g gdm 120 -
85 u gdm 120 "Gnome Display Manager" /var/lib/gdm
86 END
88 ### Split libgdm
89   mkdir -p libgdm/{lib,share}
90   mv -t libgdm       "$pkgdir"/usr/include
91   mv -t libgdm/lib   "$pkgdir"/usr/lib/{girepository-1.0,libgdm*,pkgconfig}
92   mv -t libgdm/share "$pkgdir"/usr/share/{gir-1.0,glib-2.0}
95 package_libgdm() {
96   pkgdesc="GDM support library"
97   depends=(systemd glib2 dconf)
98   mv libgdm "$pkgdir/usr"