void-packages/srcpkgs/sddm/template

69 lines
2.3 KiB
Bash

# Template file for 'sddm'
pkgname=sddm
version=0.21.0
revision=1
build_style=cmake
_configure_args="-DBUILD_MAN_PAGES=ON -DNO_SYSTEMD=ON -DUSE_ELOGIND=ON
-DLOGIN_DEFS_PATH=${XBPS_SRCPKGDIR}/shadow/files/login.defs
-DDBUS_CONFIG_FILENAME=sddm_org.freedesktop.DisplayManager.conf
-DSDDM_INITIAL_VT=7"
configure_args="${_configure_args} -DBUILD_WITH_QT6=ON
-DQT_IMPORTS_DIR=/usr/lib/qt6/qml"
hostmakedepends="extra-cmake-modules pkg-config python3-docutils
qt6-tools qt6-base"
makedepends="qt6-declarative-devel qt5-declarative-devel qt5-tools-devel
pam-devel elogind-devel"
depends="dbus"
short_desc="QML based X11 display manager"
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
license="GPL-2.0-or-later, CC-BY-3.0"
homepage="https://github.com/sddm/sddm"
changelog="https://raw.githubusercontent.com/sddm/sddm/develop/ChangeLog"
distfiles="https://github.com/sddm/sddm/archive/v${version}.tar.gz"
checksum=f895de2683627e969e4849dbfbbb2b500787481ca5ba0de6d6dfdae5f1549abf
if [ "$CROSS_BUILD" ]; then
hostmakedepends+=" sddm qt5-host-tools qt5-qmake qt5-tools"
fi
system_accounts="sddm"
sddm_homedir="/var/lib/sddm"
sddm_groups="video"
conf_files="
/etc/pam.d/sddm
/etc/pam.d/sddm-greeter
/etc/pam.d/sddm-autologin"
make_dirs="/var/lib/sddm 0755 sddm sddm"
post_configure() {
local cmake_args=""
if [ "$CROSS_BUILD" ]; then
cmake_args+=" -DCMAKE_TOOLCHAIN_FILE=${wrksrc}/${build_wrksrc}/${cmake_builddir}/cross_${XBPS_CROSS_TRIPLET}.cmake"
cmake_args+=" -DQT_HOST_PATH=/usr"
fi
cmake_args+=" -DCMAKE_INSTALL_PREFIX:PATH=/usr"
cmake_args+=" -DCMAKE_BUILD_TYPE=None"
cmake_args+=" -DCMAKE_INSTALL_LIBDIR:PATH=lib${XBPS_TARGET_WORDSIZE}"
cmake_args+=" -DCMAKE_INSTALL_SYSCONFDIR:PATH=/etc"
cmake_args+=" -DCMAKE_INSTALL_SBINDIR:PATH=bin"
export CMAKE_GENERATOR="Ninja"
CFLAGS="-DNDEBUG ${CFLAGS/ -pipe / }" CXXFLAGS="-DNDEBUG ${CXXFLAGS/ -pipe / }" \
cmake -B build5 ${cmake_args} ${_configure_args} \
${wrksrc}/${build_wrksrc}
}
post_build() {
ninja -C build5 ${makejobs} sddm-greeter
}
post_install() {
ninja -C build5 src/greeter/install components/install
DESTDIR="$DESTDIR" cmake --install build5/src/greeter
DESTDIR="$DESTDIR" cmake --install build5/components
vsed -i '/tally/d' ${DESTDIR}/etc/pam.d/sddm-autologin
vsv sddm
vlicense LICENSE.CC-BY-3.0
}