sddm-config-editor

SDDM Configuration Editor

runtime dependencies polkit (System tools)
qt5quickcontrols (Graphic libraries and applications/Other GUIs)
sddm
make dependencies qt5tools
mkdir /data/buildroot/package/sddm-config-editor
cat > /data/buildroot/package/sddm-config-editor/Config.in<< 'EOF'
config BR2_PACKAGE_SDDM_CONFIG_EDITOR
        bool "sddm-config-editor"
        depends on BR2_PACKAGE_POLKIT
        depends on BR2_PACKAGE_QT5QUICKCONTROLS
        depends on BR2_PACKAGE_SDDM
        depends on BR2_PACKAGE_QT5TOOLS
        help
          SDDM Configuration Editor
EOF

cat > /data/buildroot/package/sddm-config-editor/sddm-config-editor.mk<< 'EOF'
#############################################################
#
# sddm-config-editor
#https://github.com/lxqt/sddm-config-editor/archive/refs/tags/0.1.tar.gz
#############################################################
SDDM_CONFIG_EDITOR_VERSION = 0.1
SDDM_CONFIG_EDITOR_SOURCE  = $(SDDM_CONFIG_EDITOR_VERSION).tar.gz
SDDM_CONFIG_EDITOR_SITE    = https://github.com/lxqt/sddm-config-editor/archive/refs/tags

SDDM_CONFIG_EDITOR_DEPENDENCIES = polkit qt5quickcontrols sddm qt5tools
SDDM_CONFIG_EDITOR_INSTALL_TARGET = YES
SDDM_CONFIG_EDITOR_SUPPORTS_IN_SOURCE_BUILD = NO 
    
SDDM_CONFIG_EDITOR_CONF_OPTS = -DCMAKE_TOOLCHAIN_FILE=$(HOST_DIR)/share/buildroot/toolchainfile.cmake \
    -DCMAKE_INSTALL_PREFIX=/usr 
    
define SDDM_CONFIG_EDITOR_CONFIGURE_CMDS

  if [[ ! -d $(@D)/sddm-config-editor ]];then git clone https://github.com/lxqt/sddm-config-editor.git $(@D)/sddm-config-editor; fi
  if [[ ! -L "$(HOST_DIR)/usr/lib/libpcre.so.3" ]]; then ln -s $(HOST_DIR)/usr/lib/libpcre.so $(HOST_DIR)/usr/lib/libpcre.so.3; fi
  if [[ ! -d $(@D)/buildroot-build ]]; then mkdir $(@D)/buildroot-build; fi
  cd $(@D)/buildroot-build && \
  LDFLAGS="$(LDFLAGS) -pthread -Wl,--as-needed -Wl,--allow-shlib-undefined" cmake "$(@D)/sddm-config-editor/" $(SDDM_CONFIG_EDITOR_CONF_OPTS)
endef

$(eval $(cmake-package))
EOF

sed -i '/menu "Custom packages"/a source "package/sddm-config-editor/Config.in"' /data/buildroot/package/Config.in