# Set the config option variables if they are not already set:
if [ -r ../KDE.options.s390x ]; then
. ../KDE.options.s390x
fi
# The global options may be overridden here (if needed):
if [ -r ./local.options ]; then
. ./local.options
fi
rm -rf $PKG
mkdir -p $PKG/opt/kde
# Avoid a version number in .la files:
if [ -d /usr/lib/qt ]; then
QTDIR=/usr/lib/qt
fi
cd $TMP
echo "Building kdebase-$VERSION.tar.bz2..."
tar xjvf $CWD/kdebase-$VERSION.tar.bz2
cd kdebase-$VERSION
chown -R root:root .
zcat $CWD/kdebase-3.5.4.halbackend.diff.gz | patch -p1 --verbose --suffix=.orig --backup || exit 1
zcat $CWD/kdebase.startkde.xdg.diff.gz | patch -p1 --verbose --suffix=.orig --backup || exit 1
zcat $CWD/kdebase-3.5.4.video.redirect.diff.gz | patch -p1 --verbose --suffix=.orig --backup || exit 1
zcat $CWD/kdebase-3.5.4.kicker-taskbar-resize.diff.gz | patch -p0 --verbose --suffix=.orig --backup || exit 1
zcat $CWD/kdebase-3.5.4.ksystraycmd-quoting.diff.gz | patch -p0 --verbose --suffix=.orig --backup || exit 1
# At the last possible second, coolo steps in to help us with using media:* in
# konqueror without requiring HAL. Thanks dude! You've more than earned your name. :-)
zcat $CWD/kdebase-3.5.4.mediamanager-fstabfix.diff.gz | patch -p0 --verbose --suffix=.orig --backup || exit 1
### !!! KLUDGE ALERT !!! ###
### CAUSES ARTS TO NOT USE REALTIME PRIORITY BY DEFAULT, WORKING AROUND A LOGOUT HANG ###
### THIS SHOULD BE RECONSIDERED WITH EACH KDEBASE RELEASE! ###
cat $CWD/kludge/kcmartsrc > $PKG/opt/kde/share/config/kcmartsrc
### !!! KLUDGE ALERT !!! ###
# Change the konsole defaults to look like the real Linux console:
cat $CWD/config/konsolerc > $PKG/opt/kde/share/config/konsolerc
chmod 644 $PKG/opt/kde/share/config/konsolerc
# Make konsole a login shell by default:
cat $CWD/config/konsole.desktop > $PKG/opt/kde/share/applications/kde/konsole.desktop
chmod 644 $PKG/opt/kde/share/applications/kde/konsole.desktop
# set sane defaults for antialiasing:
if [ ! -e $PKG/opt/kde/share/config/kdeglobals ]; then
cat $CWD/config/kdeglobals > $PKG/opt/kde/share/config/kdeglobals
chmod 644 $PKG/opt/kde/share/config/kdeglobals
else
# This might be fixed or unsafe. Better check it out...
echo
echo "BAILOUT: kdeglobals already exists. Check to see if anti-aliased"
echo " fonts work out-of-the-box now..."
echo
exit 1
fi
# Setup config files for KDM:
$PKG/opt/kde/bin/genkdmconf --no-old --no-old-scripts --no-backup --in $PKG/opt/kde/share/config/kdm
# 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 kdmrc file says this is supposed
# to be the default.
cat $PKG/opt/kde/share/config/kdm/kdmrc | perl -pi -e 's|AllowRootLogin=false|AllowRootLogin=true|' > $PKG/opt/kde/share/config/kdm/kdmrc.new
rm -f $PKG/opt/kde/share/config/kdm/kdmrc
cp -a $PKG/opt/kde/share/config/kdm/Xsession $PKG/opt/kde/share/config/kdm/Xsession.orig
cat $CWD/config/Xsession > $PKG/opt/kde/share/config/kdm/Xsession
mv $PKG/opt/kde/share/config/kdm/backgroundrc $PKG/opt/kde/share/config/kdm/backgroundrc.new