1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Maintainer: Antonio Rojas <arojas@archlinux.org>
3 # Contributor: Andrea Scarpino <andrea@archlinux.org>
8 pkgdesc='QML based X11 and Wayland display manager'
10 url='https://github.com/sddm/sddm'
12 depends=(qt5-declarative xorg-xauth xorg-server ttf-font)
13 makedepends=(extra-cmake-modules python-docutils qt5-tools)
14 backup=('usr/share/sddm/scripts/Xsetup'
15 'usr/share/sddm/scripts/Xstop'
17 'etc/pam.d/sddm-autologin'
18 'etc/pam.d/sddm-greeter')
19 provides=(display-manager)
20 source=($pkgname-$pkgver.tar.gz::"https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz"
21 sddm.sysusers sddm.tmpfiles
23 sddm-fix-race-pre.patch::https://github.com/sddm/sddm/commit/68cc9e31.patch
24 sddm-fix-race.patch::https://patch-diff.githubusercontent.com/raw/sddm/sddm/pull/1324.patch
25 sddm-desktop-session.patch::https://github.com/sddm/sddm/commit/5fd5ed27.patch
28 sha256sums=('e76da1f13d5ad5e0179e3fec57543126044339405ef19c397e105e0807bd4e41'
29 '9fce66f325d170c61caed57816f4bc72e9591df083e89da114a3bb16b0a0e60f'
30 'db625f2a3649d6d203e1e1b187a054d5c6263cadf7edd824774d8ace52219677'
31 '441f441fc63c16c5dbd83411a305d88b17e50836c958677db881b9b6c13c668a'
32 '2911474a2921c7cf73fd2a358b64e1fe07154f1d2ce05a3d0b88998a3e27f2f6'
33 '0cb428a7eee95774791e7df727c35b9fe43ca0614369cc779cf9c1cbf00a3332'
34 '3a2c331177efb9530791d777297aba32822c55f0e9de116d89c640d3d1ba0843'
35 '5809f21a93a26a610a11c2e41fe6c9b64a142877c2accd45c83350459b1d357c'
36 'e9058d261138e637248b20243e3e81ff337ab669a4a25fbff387bf9558a682c6')
39 patch -d $pkgname-$pkgver -p1 < pam-faillock.patch # Port away from deprecated pam_tally2
40 patch -d $pkgname-$pkgver -p1 < sddm-fix-race-pre.patch # Make next patch apply
41 patch -d $pkgname-$pkgver -p1 < sddm-fix-race.patch # Fix race at startup
42 patch -d $pkgname-$pkgver -p1 < sddm-desktop-session.patch # Fix desktop session name
43 patch -d $pkgname-$pkgver -p1 < sddm-fix-build.patch # Fix build with Qt post 5.15.2
44 patch -d $pkgname-$pkgver -p1 < sddm-no-portal.patch # Don't launch xdg-desktop-portal
48 cmake -B build -S $pkgname-$pkgver \
49 -DCMAKE_INSTALL_PREFIX=/usr \
50 -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib/sddm \
51 -DDBUS_CONFIG_DIR=/usr/share/dbus-1/system.d \
52 -DDBUS_CONFIG_FILENAME=sddm_org.freedesktop.DisplayManager.conf \
53 -DBUILD_MAN_PAGES=ON \
59 DESTDIR="$pkgdir" cmake --install build
61 install -Dm644 sddm.sysusers "$pkgdir"/usr/lib/sysusers.d/sddm.conf
62 install -Dm644 sddm.tmpfiles "$pkgdir"/usr/lib/tmpfiles.d/sddm.conf
64 install -d "$pkgdir"/usr/lib/sddm/sddm.conf.d
65 "$pkgdir"/usr/bin/sddm --example-config > "$pkgdir"/usr/lib/sddm/sddm.conf.d/default.conf
66 # Don't set PATH in sddm.conf
67 sed -r 's|DefaultPath=.*|DefaultPath=/usr/local/sbin:/usr/local/bin:/usr/bin|g' -i "$pkgdir"/usr/lib/sddm/sddm.conf.d/default.conf
68 # Unset InputMethod https://github.com/sddm/sddm/issues/952
69 sed -e "/^InputMethod/s/qtvirtualkeyboard//" -i "$pkgdir"/usr/lib/sddm/sddm.conf.d/default.conf