# Maintainer: Piotr Gorski # Contributor: Jerome Leclanche _pkgbase="sddm" pkgname="$_pkgbase-git" pkgver=0.21.0.14.gae072f9 pkgrel=3 pkgdesc="The Simple Desktop Display Manager" arch=("x86_64") url="https://github.com/sddm/sddm" license=("GPL") depends=(bash gcc-libs glibc libxau libxcb pam qt6-base qt6-declarative systemd-libs ttf-font xorg-server xorg-xauth) makedepends=(extra-cmake-modules python-docutils qt5-base qt5-declarative qt5-tools qt6-tools git) optdepends=('qt5-declarative: for using Qt5 themes') provides=("$_pkgbase" 'display-manager') conflicts=("$_pkgbase") backup=('usr/share/sddm/scripts/Xsetup' 'usr/share/sddm/scripts/Xstop' 'etc/pam.d/sddm' 'etc/pam.d/sddm-autologin' 'etc/pam.d/sddm-greeter') source=("git+https://github.com/sddm/sddm.git#branch=develop" '0001-Revert-cmake-remove-the-final-Arch-PAM-modules.patch') sha256sums=('SKIP' '8939dabe3dd539ff44cf3e5740a1a4a518836ae147fbe54f163bd9f0b10ccc6e') pkgver() { cd $_pkgbase #_ver="$(cat CMakeLists.txt | grep -m3 -e _VERSION_MAJOR -e _VERSION_MINOR -e _VERSION_PATCH | grep -o "[[:digit:]]*" | paste -sd'.')" #echo "${_ver}.r$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)" git describe --tags --long | sed 's/^v//;s/-/./g' } prepare() { cd $_pkgbase local src for src in "${source[@]}"; do src="${src%%::*}" src="${src##*/}" [[ $src = *.patch ]] || continue echo "Applying patch $src..." patch -Np1 < "../$src" done } build() { cmake -B build -S $_pkgbase \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBEXECDIR=/usr/lib/sddm \ -DBUILD_WITH_QT6=ON \ -DDBUS_CONFIG_DIR=/usr/share/dbus-1/system.d \ -DDBUS_CONFIG_FILENAME=sddm_org.freedesktop.DisplayManager.conf \ -DBUILD_MAN_PAGES=ON \ -DUID_MAX=60513 cmake --build build cmake -B build5 -S $_pkgbase \ -DCMAKE_INSTALL_PREFIX=/usr cmake --build build5/src/greeter cmake --build build5/components } package() { DESTDIR="$pkgdir" cmake --install build DESTDIR="$pkgdir" cmake --install build5/src/greeter DESTDIR="$pkgdir" cmake --install build5/components install -d "$pkgdir"/usr/lib/sddm/sddm.conf.d "$pkgdir"/usr/bin/sddm --example-config > "$pkgdir"/usr/lib/sddm/sddm.conf.d/default.conf # Don't set PATH in sddm.conf sed -r 's|DefaultPath=.*|DefaultPath=/usr/local/sbin:/usr/local/bin:/usr/bin|g' -i "$pkgdir"/usr/lib/sddm/sddm.conf.d/default.conf # Unset InputMethod https://github.com/sddm/sddm/issues/952 sed -e "/^InputMethod/s/qtvirtualkeyboard//" -i "$pkgdir"/usr/lib/sddm/sddm.conf.d/default.conf }