You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

241 lines
8.8 KiB

#!/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
## allow for configuration files directory != /etc/trinity
sed -i "s|/etc/trinity/|$SYS_CNF_DIR/|" tdm/kfrontend/gentdmconf.c || true
## make default tdm screen text clearer against dark background and align login button with clickable area
## edit color="#ffff74" and/or color="#ff0000" for your own choice
echo $'
--- tdm/kfrontend/themes/o2_enterprise/enterprise.xml
+++ tdm/kfrontend/themes/o2_enterprise/enterprise.xml
@@ -12 +12 @@
- <normal color="#000000" font="Sans 10" />
+ <normal color="#ffff74" font="Sans 10" />
@@ -39 +39 @@
- <pos width="box" x="540" y="188" anchor="c" height="box" />
+ <pos width="38" x="540" y="188" anchor="c" height="box" />
@@ -42 +42 @@
- <pos x="90%" y="50%" anchor="c" />
+ <pos x="40%" y="50%" anchor="c" />
@@ -59 +59 @@
- <normal color="#000000" font="Sans Condensed 10" />
+ <normal color="#ffff74" font="Sans Condensed 10" />
@@ -64 +64 @@
- <normal color="#000000" font="Sans Condensed 10" />
+ <normal color="#ffff74" font="Sans Condensed 10" />
@@ -86,2 +86,2 @@
- <pos x="435" y="293" anchor="s" />
- <normal color="#CD0000" font="Sans 10" />
+ <pos x="435" y="240" anchor="s" />
+ <normal color="#ff0000" font="Sans 11" />
@@ -93,2 +93,2 @@
- <normal color="#CD0000" font="Sans 10" />
- <pos x="435" y="323" anchor="s" />
+ <normal color="#ff0000" font="Sans 11" />
+ <pos x="435" y="260" anchor="s" />
' | while read line
do
patch -p0
done
## enable konqueror filemanagement ViewMode to be set - TDE bug 1963
echo $'
--- konqueror/listview/konq_detailedlistview.desktop
+++ konqueror/listview/konq_detailedlistview.desktop
@@ -86,0 +87 @@
+X-TDE-BrowserView-Built-Into=konqueror
--- konqueror/iconview/konq_iconview.desktop
+++ konqueror/iconview/konq_iconview.desktop
@@ -87,0 +88 @@
+X-TDE-BrowserView-Built-Into=konqueror
--- konqueror/iconview/konq_multicolumnview.desktop
+++ konqueror/iconview/konq_multicolumnview.desktop
@@ -87,0 +88 @@
+X-TDE-BrowserView-Built-Into=konqueror
--- konqueror/listview/konq_infolistview.desktop
+++ konqueror/listview/konq_infolistview.desktop
@@ -84,0 +85 @@
+X-TDE-BrowserView-Built-Into=konqueror
--- konqueror/listview/konq_textview.desktop
+++ konqueror/listview/konq_textview.desktop
@@ -87,0 +88 @@
+X-TDE-BrowserView-Built-Into=konqueror
--- konqueror/listview/konq_treeview.desktop
+++ konqueror/listview/konq_treeview.desktop
@@ -87,0 +88 @@
+X-TDE-BrowserView-Built-Into=konqueror
' | while read line
do
patch -p0
done
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=$SYS_CNF_DIR \
-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|{SYS_CNF_DIR}|$SYS_CNF_DIR|;s|{INSTALL_TDE}|$INSTALL_TDE|" < $SRCDIR/profile.d/tde.sh > $PKG/etc/profile.d/tde.sh
sed "s|{SYS_CNF_DIR}|$SYS_CNF_DIR|;s|{INSTALL_TDE}|$INSTALL_TDE|" < $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$SYS_CNF_DIR
mv $PKG$INSTALL_TDE/share/config/tdm $PKG$SYS_CNF_DIR/tdm
( cd $PKG$INSTALL_TDE/share/config ; ln -sf $SYS_CNF_DIR/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
# Setup config files for TDM:
$PKG$INSTALL_TDE/bin/gentdmconf --no-old --no-old-scripts --no-backup --in $PKG$SYS_CNF_DIR/tdm
## set correct paths for config files
sed -i "s|$INSTALL_TDE/share/config/tdm/|$SYS_CNF_DIR/tdm/|" $PKG$SYS_CNF_DIR/tdm/tdmrc
# Allow root to login
sed 's|AllowRootLogin=false|AllowRootLogin=true|' $PKG$SYS_CNF_DIR/tdm/tdmrc > $PKG$SYS_CNF_DIR/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$SYS_CNF_DIR/tdm/tdmrc
mv $PKG$SYS_CNF_DIR/tdm/Xsession $PKG$SYS_CNF_DIR/tdm/Xsession.orig
cat $SRCDIR/config/Xsession | sed "s|{INSTALL_TDE}|$INSTALL_TDE|" > $PKG$SYS_CNF_DIR/tdm/Xsession
mv $PKG$SYS_CNF_DIR/tdm/backgroundrc $PKG$SYS_CNF_DIR/tdm/backgroundrc.new
if [[ -r $PKG$SYS_CNF_DIR/tdm/README ]]; then
sed -i "s|$TMP_BUILD/package-tdebase$SYS_CNF_DIR/tdm|$SYS_CNF_DIR/tdm|" $PKG$SYS_CNF_DIR/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 "s|{SYS_CNF_DIR}|$SYS_CNF_DIR|;s|{INSTALL_TDE}|$INSTALL_TDE|;s|{TQTDIR}|$TQTDIR|" < $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
}
## set TDEHOME and TDEROOTHOME variables - defaults ~/.trinity and /root/.trinity
[[ $SYS_CNF_DIR == /etc/tde ]] && {
echo "# upgradepkg runs installpkg twice, so firstly remove any previous TDE*HOME entries
sed -i '/TDE.*HOME/d' /etc/profile
echo 'export TDEHOME=~/.tde' >> /etc/profile
echo 'export TDEROOTHOME=/root/.tde' >> /etc/profile
" >> $PKG/install/doinst.sh
}
makepkg_fn