From d8b5af0c3c32008a2dbeb0b45483fb7fa38064fb Mon Sep 17 00:00:00 2001 From: olevenets2 Date: Mon, 5 Feb 2018 15:41:38 +0300 Subject: [PATCH] Update tdebase.SlackBuild fix for TDM display manager --- Core/tdebase/tdebase.SlackBuild | 40 ++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/Core/tdebase/tdebase.SlackBuild b/Core/tdebase/tdebase.SlackBuild index d8fcb19..d63e9bc 100755 --- a/Core/tdebase/tdebase.SlackBuild +++ b/Core/tdebase/tdebase.SlackBuild @@ -52,7 +52,7 @@ cd_builddir_fn -DCMAKE_CXX_COMPILER=${COMPILER_CXX} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_INSTALL_PREFIX=${INSTALL_TDE} \ - -DSYSCONF_INSTALL_DIR="/etc/trinity" \ + -DSYSCONF_INSTALL_DIR="/etc/tde" \ -DMAN_INSTALL_DIR=${INSTALL_TDE}/man \ -DLIB_SUFFIX=${LIBDIRSUFFIX} \ -DWITH_OPENEXR="ON" \ @@ -97,22 +97,30 @@ sed "s|\${INSTALL_TDE}|${INSTALL_TDE}|g" < $SRCDIR/profile.d/tde.sh > $PKG/etc/p sed "s|\${INSTALL_TDE}|${INSTALL_TDE}|g" < $SRCDIR/profile.d/tde.csh > $PKG/etc/profile.d/tde.csh chmod 755 $PKG/etc/profile.d/tde.{,c}sh +# Add some configuration files / scripts needed by TDE. +mkdir -p ${PKG}/etc/tde +mv ${PKG}/${INSTALL_TDE}/share/config/tdm ${PKG}/etc/tde/tdm +( cd ${PKG}/${INSTALL_TDE}/share/config ; ln -sf /etc/tde/tdm tdm ) + +# Set sane permissions for the include files. +if [ -d ${PKG}/${INSTALL_TDE}/include ]; then + find ${PKG}/${INSTALL_TDE}/include -type f -exec chmod 0644 {} \; +fi + +# Ensure correct login manager session file is available. +mkdir -p ${PKG}/usr/share/apps/tdm/sessions +cp ${PKG}/${INSTALL_TDE}/share/apps/tdm/sessions/tde.desktop ${PKG}/usr/share/apps/tdm/sessions/ + # Setup config files for TDM: -$PKG${INSTALL_TDE}/bin/gentdmconf --no-old --no-old-scripts --no-backup --in $PKG${INSTALL_TDE}/share/config/tdm -# Not allowing root to login at the console is just plain silly. If they have physical access to -# the machine, what's the point of trying to stop this? Even the tdmrc file says this is supposed -# to be the default. -cat $PKG${INSTALL_TDE}/share/config/tdm/tdmrc | perl -pi -e 's|AllowRootLogin=false|AllowRootLogin=true|' > $PKG${INSTALL_TDE}/share/config/tdm/tdmrc.new -rm -f $PKG${INSTALL_TDE}/share/config/tdm/tdmrc - -cp -a $PKG${INSTALL_TDE}/share/config/tdm/Xsession $PKG${INSTALL_TDE}/share/config/tdm/Xsession.orig -sed "s|\${INSTALL_TDE}|${INSTALL_TDE}|g" < $SRCDIR/config/Xsession > $PKG${INSTALL_TDE}/share/config/tdm/Xsession -mv $PKG${INSTALL_TDE}/share/config/tdm/backgroundrc $PKG${INSTALL_TDE}/share/config/tdm/backgroundrc.new - -# Move the TDM files someplace FHS compliant: -mkdir -p $PKG/etc/tde -mv $PKG${INSTALL_TDE}/share/config/tdm $PKG/etc/tde -( cd $PKG${INSTALL_TDE}/share/config ; ln -sf ../../../etc/tde/tdm . ) +${PKG}/${INSTALL_TDE}/bin/gentdmconf --no-old --no-old-scripts --no-backup --in ${PKG}/etc/tde/tdm +# Allow root to login +cat ${PKG}/etc/tde/tdm/tdmrc | perl -pi -e 's|AllowRootLogin=false|AllowRootLogin=true|' > ${PKG}/etc/tde/tdm/tdmrc.new +mv ${PKG}/etc/tde/tdm/Xsession ${PKG}/etc/tde/tdm/Xsession.orig +cat ${SRCDIR}/config/Xsession | sed "s|PREFIX|${INSTALL_TDE}|g" > ${PKG}/etc/tde/tdm/Xsession +mv ${PKG}/etc/tde/tdm/backgroundrc ${PKG}/etc/tde/tdm/backgroundrc.new +if [[ -r ${PKG}/${INSTALL_TDE}/etc/tde/tdm/README ]]; then + sed -i "s|${TMP}/package-tdebase/etc/tde/tdm|/etc/tde/tdm|" ${PKG}/${INSTALL_TDE}/etc/tde/tdm/README +fi mkdir_install_fn