summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2155584b303cc044b92722dc4ae39e3a100c2523 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Maintainer: Piotr Gorski <lucjan.lucjanov@gmail.com>
# Contributor: Jerome Leclanche <jerome@leclan.ch>

_pkgbase="sddm"
pkgname="$_pkgbase-git"
pkgver=0.21.0.14.gae072f9
pkgrel=4
pkgdesc="The Simple Desktop Display Manager"
arch=("x86_64")
url="https://github.com/sddm/sddm"
license=("GPL-2.0-only")
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
}