55 lines
2.4 KiB
Bash
55 lines
2.4 KiB
Bash
# This is the recipe.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
|
|
|
|
# The build function is executed in the source directory
|
|
# This function is used to compile the source code
|
|
build() {
|
|
cmake -B build \
|
|
-D CMAKE_POLICY_VERSION_MINIMUM='3.5' \
|
|
-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=ON \
|
|
-D BUILD_WITH_QT6=ON \
|
|
-D DATA_INSTALL_DIR=/usr/share/sddm \
|
|
-D DBUS_CONFIG_FILENAME=sddm_org.freedesktop.DisplayManager.conf
|
|
cmake --build build
|
|
}
|
|
|
|
# The package function is executed in the source directory
|
|
# This function is used to move the compiled files into the output directory
|
|
package() {
|
|
DESTDIR="$BPM_OUTPUT" cmake --install build
|
|
|
|
# Create needed directories
|
|
install -dm755 "$BPM_OUTPUT"/var/lib/sddm
|
|
chown 64:64 "$BPM_OUTPUT"/var/lib/sddm
|
|
|
|
# Install pam files
|
|
rm "$BPM_OUTPUT"/etc/pam.d/*
|
|
install -Dm644 "$BPM_WORKDIR"/sddm.pam "$BPM_OUTPUT"/etc/pam.d/sddm
|
|
install -Dm644 "$BPM_WORKDIR"/sddm-autologin.pam "$BPM_OUTPUT"/etc/pam.d/sddm-autologin
|
|
install -Dm644 "$BPM_WORKDIR"/sddm-greeter.pam "$BPM_OUTPUT"/etc/pam.d/sddm-greeter
|
|
|
|
# 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 sysusers file
|
|
install -Dm644 "$BPM_WORKDIR"/sysusers "$BPM_OUTPUT"/usr/lib/sysusers.d/sddm.conf
|
|
|
|
# Install esvm service
|
|
install -Dm644 "$BPM_WORKDIR"/sddm.esv "$BPM_OUTPUT"/etc/esvm/services/sddm.esv
|
|
install -Dm755 "$BPM_WORKDIR"/sddm.sh "$BPM_OUTPUT"/etc/esvm/scripts/sddm.sh
|
|
|
|
# Install package licenses
|
|
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
|
|
}
|