|
|
|
#!/bin/sh
|
|
|
|
# Generated by Alien's SlackBuild Toolkit: http://slackware.com/~alien/AST
|
|
|
|
# Copyright 2009, 2010, 2011, 2012, 2013, 2014, 2015 Eric Hameleers, Eindhoven, Netherlands
|
|
|
|
# Copyright 2015-2017 Thorn Inurcide
|
|
|
|
# Copyright 2015-2017 tde-slackbuilds project on GitHub
|
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# Permission to use, copy, modify, and distribute this software for
|
|
|
|
# any purpose with or without fee is hereby granted, provided that
|
|
|
|
# the above copyright notice and this permission notice appear in all
|
|
|
|
# copies.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
|
|
|
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
# IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
|
|
|
|
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
|
|
|
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
|
|
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
# SUCH DAMAGE.
|
|
|
|
|
|
|
|
# Thanks to Slackware 12.2 SlackBuild for kdebase
|
|
|
|
|
|
|
|
PRGNAM=tdebase
|
|
|
|
VERSION=${VERSION:-$TDEVERSION}
|
|
|
|
BUILD=${BUILD:-1}
|
|
|
|
TAG=${TAG:-_tde}
|
|
|
|
|
|
|
|
source ../../get-source.sh
|
|
|
|
getsource_fn
|
|
|
|
|
|
|
|
untar_fn
|
|
|
|
listdocs_fn
|
|
|
|
|
|
|
|
## patch for gcc7 twin/client.cpp:2978:38: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
|
|
|
|
sed -i 's|data != None|data != 0|' twin/client.cpp
|
|
|
|
## part 1/2 of setting konqueror filemanagement default view mode
|
|
|
|
sed -i "s|konq_iconview|$VIEWMODE|" konqueror/profile_filemanagement.desktop
|
|
|
|
|
|
|
|
chown_fn
|
|
|
|
|
|
|
|
cd_builddir_fn
|
|
|
|
|
|
|
|
cmake \
|
|
|
|
-DCMAKE_C_FLAGS:STRING=$SLKCFLAGS \
|
|
|
|
-DCMAKE_CXX_FLAGS:STRING=$SLKCFLAGS \
|
|
|
|
-DCMAKE_C_FLAGS_RELEASE:STRING=$SLKCFLAGS \
|
|
|
|
-DCMAKE_CXX_FLAGS_RELEASE:STRING=$SLKCFLAGS \
|
|
|
|
-DCMAKE_C_COMPILER=$COMPILER \
|
|
|
|
-DCMAKE_CXX_COMPILER=$COMPILER_CXX \
|
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_INSTALL_PREFIX=$INSTALL_TDE \
|
|
|
|
-DSYSCONF_INSTALL_DIR="/etc/trinity" \
|
|
|
|
-DMAN_INSTALL_DIR=$INSTALL_TDE/man \
|
|
|
|
-DLIB_SUFFIX=$LIBDIRSUFFIX \
|
|
|
|
-DWITH_OPENEXR="ON" \
|
|
|
|
-DWITH_XCOMPOSITE="ON" \
|
|
|
|
-DWITH_XCURSOR="ON" \
|
|
|
|
-DWITH_SUDO_TDESU_BACKEND="ON" \
|
|
|
|
-DWITH_SUDO_KONSOLE_SUPER_USER_COMMAND="ON" \
|
|
|
|
-DWITH_PAM="OFF" \
|
|
|
|
-DWITH_SHADOW="ON" \
|
|
|
|
-DWITH_XFIXES="ON" \
|
|
|
|
-DWITH_XRANDR="ON" \
|
|
|
|
-DWITH_XRENDER="ON" \
|
|
|
|
-DWITH_OPENGL="ON" \
|
|
|
|
-DWITH_XSCREENSAVER="OFF" \
|
|
|
|
-DWITH_XTEST="ON" \
|
|
|
|
-DWITH_LIBART="ON" \
|
|
|
|
-DWITH_LIBUSB="OFF" \
|
|
|
|
-DWITH_XDMCP="ON" \
|
|
|
|
-DWITH_XINERAMA="ON" \
|
|
|
|
-DWITH_ARTS="ON" \
|
|
|
|
-DWITH_TDEHWLIB="ON" \
|
|
|
|
-DWITH_UPOWER="ON" \
|
|
|
|
-DWITH_PCRE="ON" \
|
|
|
|
-DBUILD_ALL="ON" \
|
|
|
|
-Wno-dev \
|
|
|
|
..
|
|
|
|
make_fn
|
|
|
|
|
|
|
|
installdocs_fn
|
|
|
|
|
|
|
|
strip_fn
|
|
|
|
|
|
|
|
# Add xinitrc:
|
|
|
|
mkdir -p $PKG/etc/X11/xinit
|
|
|
|
sed "s|\$INSTALL_TDE|$INSTALL_TDE|g" < $SRCDIR/xinitrc.tde > $PKG/etc/X11/xinit/xinitrc.tde
|
|
|
|
chmod 755 $PKG/etc/X11/xinit/xinitrc.tde
|
|
|
|
(cd $PKG/etc/X11/xinit/
|
|
|
|
ln -sf xinitrc.tde xinitrc)
|
|
|
|
|
|
|
|
mkdir -p $PKG/etc/profile.d
|
|
|
|
sed "s|\$INSTALL_TDE|$INSTALL_TDE|g" < $SRCDIR/profile.d/tde.sh > $PKG/etc/profile.d/tde.sh
|
|
|
|
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/trinity
|
|
|
|
mv $PKG$INSTALL_TDE/share/config/tdm $PKG/etc/trinity/tdm
|
|
|
|
( cd $PKG$INSTALL_TDE/share/config ; ln -sf /etc/trinity/tdm tdm )
|
|
|
|
|
|
|
|
# Add rc.4.local to give TDM priority over rc.4 X11 session manager options
|
|
|
|
# Assumes that rc.4.new from sysvinit-scripts still has the rc.4.local option
|
|
|
|
mkdir $PKG/etc/rc.d
|
|
|
|
sed "s|\$INSTALL_TDE|$INSTALL_TDE|" < $SRCDIR/rc.4.local > $PKG/etc/rc.d/rc.4.local
|
|
|
|
chmod 755 $PKG/etc/rc.d/rc.4.local
|
|
|
|
|
|
|
|
# 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/ || true
|
|
|
|
|
|
|
|
# Setup config files for TDM:
|
|
|
|
$PKG$INSTALL_TDE/bin/gentdmconf --no-old --no-old-scripts --no-backup --in $PKG/etc/trinity/tdm
|
|
|
|
## set correct paths for config files
|
|
|
|
sed -i 's|/opt/trinity/share/config/tdm/|/etc/trinity/tdm/|' $PKG/etc/trinity/tdm/tdmrc
|
|
|
|
# Allow root to login
|
|
|
|
sed 's|AllowRootLogin=false|AllowRootLogin=true|' $PKG/etc/trinity/tdm/tdmrc > $PKG/etc/trinity/tdm/tdmrc.new
|
|
|
|
## Remove tdmrc which has AllowRootLogin=false set and would be used for a new installation
|
|
|
|
## The installed tdmrc will be created by doinst.sh from tdmrc.new if it doesn't exist
|
|
|
|
rm $PKG/etc/trinity/tdm/tdmrc
|
|
|
|
mv $PKG/etc/trinity/tdm/Xsession $PKG/etc/trinity/tdm/Xsession.orig
|
|
|
|
cat $SRCDIR/config/Xsession | sed "s|\$INSTALL_TDE|$INSTALL_TDE|" > $PKG/etc/trinity/tdm/Xsession
|
|
|
|
mv $PKG/etc/trinity/tdm/backgroundrc $PKG/etc/trinity/tdm/backgroundrc.new
|
|
|
|
if [[ -r $PKG$INSTALL_TDE/etc/trinity/tdm/README ]]; then
|
|
|
|
sed -i "s|$TMP/package-tdebase/etc/trinity/tdm|/etc/trinity/tdm|" $PKG$INSTALL_TDE/etc/trinity/tdm/README
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir_install_fn
|
|
|
|
|
|
|
|
echo "
|
|
|
|
# HOW TO EDIT THIS FILE:
|
|
|
|
# The 'handy ruler' below makes it easier to edit a package description. Line
|
|
|
|
# up the first '|' above the ':' following the base package name, and the '|'
|
|
|
|
# on the right side marks the last column you can put a character in. You must
|
|
|
|
# make exactly 11 lines for the formatting to be correct. It's also
|
|
|
|
# customary to leave one space after the ':'.
|
|
|
|
|
|
|
|
|-----handy-ruler------------------------------------------------------|
|
|
|
|
$PRGNAM: $PRGNAM (The Trinity Desktop base)
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM: tdebase is the second mandatory package (besides tdelibs) for the
|
|
|
|
$PRGNAM: Trinity Desktop Environment. Here we have various applications and
|
|
|
|
$PRGNAM: infrastructure files and libraries.
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM:
|
|
|
|
$PRGNAM: Home: https://www.trinitydesktop.org/index.php
|
|
|
|
" > $PKG/install/slack-desc
|
|
|
|
|
|
|
|
sed -e "s|\$INSTALL_TDE|$INSTALL_TDE|g" -e "s|\$TQTDIR|$TQTDIR|g" < $SRCDIR/doinst.sh > $PKG/install/doinst.sh
|
|
|
|
[[ $RUNLEVEL == 4 ]] && {
|
|
|
|
echo "
|
|
|
|
## set default runlevel to 4 for tdm
|
|
|
|
sed -i 's|id:[1-5]|id:4|' etc/inittab
|
|
|
|
" >> $PKG/install/doinst.sh
|
|
|
|
}
|
|
|
|
## part 2/2 of setting konqueror filemanagement default view mode
|
|
|
|
## add [MainView Settings] ViewMode to konquerorrc
|
|
|
|
echo "
|
|
|
|
mkdir -p .\$HOME/.trinity/share/config/
|
|
|
|
echo '[MainView Settings]
|
|
|
|
ViewMode=$VIEWMODE' > .\$HOME/.trinity/share/config/konquerorrc
|
|
|
|
" >> $PKG/install/doinst.sh
|
|
|
|
|
|
|
|
makepkg_fn
|