commit a5041f29e6a14ad33ffd2c13aec080833433dcb3 Author: EnumDev Date: Thu May 8 17:18:40 2025 +0300 Initial Commit diff --git a/pkg.info b/pkg.info new file mode 100644 index 0000000..475e174 --- /dev/null +++ b/pkg.info @@ -0,0 +1,10 @@ +name: sddm +description: QML based X11 and Wayland display manager +version: 0.21.0 +url: https://github.com/sddm/sddm +license: GPL2-only,CC-BY-3.0 +architecture: any +depends: ["gcc","glibc","elogind","libxau","libxcb","pam","qt6-base","qt6-declarative","ttf-font","xorg-server","xorg-xauth"] +make_depends: ["cmake","extra-cmake-modules","qt6-tools"] +keep: ["etc/sddm.conf","usr/share/sddm/scripts/Xsetup","usr/share/sddm/scripts/Xstop"] +type: source diff --git a/source-files/pam.d/sddm b/source-files/pam.d/sddm new file mode 100644 index 0000000..cce49d1 --- /dev/null +++ b/source-files/pam.d/sddm @@ -0,0 +1,11 @@ +auth requisite pam_nologin.so +auth required pam_env.so + +auth required pam_succeed_if.so uid >= 1000 quiet +auth include system-auth + +account include system-account +password include system-password + +session required pam_limits.so +session include system-session diff --git a/source-files/pam.d/sddm-autologin b/source-files/pam.d/sddm-autologin new file mode 100644 index 0000000..89a7339 --- /dev/null +++ b/source-files/pam.d/sddm-autologin @@ -0,0 +1,12 @@ +auth requisite pam_nologin.so +auth required pam_env.so + +auth required pam_succeed_if.so uid >= 1000 quiet +auth required pam_permit.so + +account include system-account + +password required pam_deny.so + +session required pam_limits.so +session include system-session diff --git a/source-files/pam.d/sddm-greeter b/source-files/pam.d/sddm-greeter new file mode 100644 index 0000000..dab9c40 --- /dev/null +++ b/source-files/pam.d/sddm-greeter @@ -0,0 +1,7 @@ +auth required pam_env.so +auth required pam_permit.so + +account required pam_permit.so +password required pam_deny.so +session required pam_unix.so +-session optional pam_systemd.so diff --git a/source-files/sddm.esv b/source-files/sddm.esv new file mode 100644 index 0000000..1979723 --- /dev/null +++ b/source-files/sddm.esv @@ -0,0 +1,7 @@ +name: sddm +description: Start the Simple Desktop Display Manager +dependencies: ["udevd"] +type: background +start_cmd: /etc/esvm/scripts/sddm.sh +exit_method: kill +restart: true diff --git a/source.sh b/source.sh new file mode 100644 index 0000000..578909a --- /dev/null +++ b/source.sh @@ -0,0 +1,60 @@ +# This is the source.sh script. It is executed by BPM in a temporary directory when compiling a source package +# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE +# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT + +DOWNLOAD="https://github.com/sddm/sddm/archive/v${BPM_PKG_VERSION}/sddm-${BPM_PKG_VERSION}.tar.gz" +FILENAME="${DOWNLOAD##*/}" + +# The prepare function is executed in the root of the temp directory +# This function is used for downloading files and putting them into the correct location +prepare() { + wget "$DOWNLOAD" + tar -xvf "$FILENAME" --strip-components=1 -C "$BPM_SOURCE" +} + +# The build function is executed in the source directory +# This function is used to compile the source code +build() { + mkdir build + cd build + + cmake -D CMAKE_INSTALL_PREFIX=/usr \ + -D CMAKE_BUILD_TYPE=Release \ + -DENABLE_JOURNALD=OFF \ + -DNO_SYSTEMD=ON \ + -DUSE_ELOGIND=ON \ + -D RUNTIME_DIR=/run/sddm \ + -D BUILD_MAN_PAGES=OFF \ + -D BUILD_WITH_QT6=ON \ + -D DATA_INSTALL_DIR=/usr/share/sddm \ + -D DBUS_CONFIG_FILENAME=sddm_org.freedesktop.DisplayManager.conf \ + .. + make +} + +# The package function is executed in the source directory +# This function is used to move the compiled files into the output directory +package() { + cd build + make DESTDIR="$BPM_OUTPUT" install + + # Create needed directories + install -dm755 "$BPM_OUTPUT"/var/lib/sddm + chown 64:64 "$BPM_OUTPUT"/var/lib/sddm + + # Install working pam config files + rm "$BPM_OUTPUT"/etc/pam.d/* + install -Dm644 "$BPM_WORKDIR"/pam.d/* -t "$BPM_OUTPUT"/etc/pam.d/ + + # Install example config + "$BPM_OUTPUT"/usr/bin/sddm --example-config > "$BPM_OUTPUT"/etc/sddm.conf + + # Disable virtual keyboard + sed -i 's/qtvirtualkeyboard//' "$BPM_OUTPUT"/etc/sddm.conf + + # Install esvm service + install -Dm644 "$BPM_WORKDIR"/sddm.esv "$BPM_OUTPUT"/etc/esvm/services/sddm.esv + + install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/sddm/LICENSE + install -Dm644 "$BPM_SOURCE"/LICENSE.CC-BY-3.0 "$BPM_OUTPUT"/usr/share/licenses/sddm/LICENSE.CC-BY-3.0 +}