# kdebase 3.5.1
# =============
# Slackware 8.1's 'kdebase' package includes version 3.0.1, 9.0's includes
# 3.1, 9.1's includes 3.1.4, 10.0's includes 3.2.3, 10.1's includes 3.3.2,
# and 10.2's includes 3.4.2
#
# Slackware 10.2 includes KDE 3.4.2
## If you replaced Slackware's 'kernel-headers' 2.4.31 package with the
## 2.6.13 one from 'testing', you may want to go back to 2.4.31
## The build failed for me with the 2.6.13 package installed with these
## errors:
# In file included from joydevice.h:27,
# from joystick.cpp:29:
# /usr/include/linux/joystick.h:131: error: `__s64' does not name a type
# /usr/include/linux/joystick.h:132: error: `__s64' does not name a type
# In file included from joydevice.h:27,
# from joystick.cpp:29:
# /usr/include/linux/joystick.h:142:2: #error Unexpected BITS_PER_LONG
## ...but it was fine with the 2.4.31 headers. You can also probably
## mess with joystick.h instead, but I didn't.
# I create a directory for KDE source directories and one for tarballs and
# put all of them in there
mkdir -p -m 0700 ~/src/kde ~/installed/kde
cd
test -f installed/kde/kdebase-3.5.1.tar.bz2 &&
mv installed/kde/kdebase-3.5.1.tar.bz2 .
test -f installed/kdebase-3.5.1.tar.bz2 &&
mv installed/kdebase-3.5.1.tar.bz2 .
test ! -f kdebase-3.5.1.tar.bz2 &&
wget http://download.kde.org/stable/3.5.1/src/\
kdebase-3.5.1.tar.bz2
find src/kde src -maxdepth 1 -type d -name "kdebase-*" \
-exec rm -r {} \;
cd src/kde
tar xjvf ~/kdebase-3.5.1.tar.bz2
cd kdebase-3.5.1
test $UID = 0 && chown -R root:root .
# Use a patch to ./startkde from Slackware to make sure /opt/kde/etc/xdg
# takes priority over /etc/xdg
wget -nc ftp://ftp.slackware.com/pub/slackware/slackware-10.2/source/kde/kdebase/\
kdebase.startkde.xdg.diff.gz &&
zcat kdebase.startkde.xdg.diff.gz | patch -p0
# If you use PAM, replace --with-shadow with --with-pam
# My Samba is installed in the source default location of /usr/local/samba.
# I have to specify the CPPFLAGS and LDFLAGS parts below for configure to
# find Samba's headers and the smbclient library.
CPPFLAGS=-I/usr/local/samba/include \
LDFLAGS=-L/usr/local/samba/lib \
./configure --prefix=/opt/kde --with-shadow --with-ssl-dir=/usr/local/ssl
make
# Become root to install it
su
test -x /sbin/removepkg && /sbin/removepkg kdebase
make install
# Add /opt/kde/lib to /etc/ld.so.conf if it's not already in there:
grep "^/opt/kde/lib$" /etc/ld.so.conf > /dev/null 2>&1 ||
echo "/opt/kde/lib" >> /etc/ld.so.conf
ldconfig
# Put a xinitrc.kde file in /etc/X11/xinit, symlink xinitrc to it
( cd /etc/X11/xinit
wget ftp://ftp.slackware.com/pub/slackware/slackware-current/source/\
kde/kdebase/xinit/xinitrc.kde -O xinitrc.kde.new
test -f xinitrc.kde &&
( diff -q xinitrc.kde xinitrc.kde.new && rm -f xinitrc.kde.new )
test ! -f xinitrc.kde && mv -f xinitrc.kde.new xinitrc.kde
test -f xinitrc.kde.new &&
mv -f xinitrc.kde xinitrc.kde.old &&
mv -f xinitrc.kde.new xinitrc.kde )
# If you included PAM support, set up the 'kde' service. See the sample
# files ./kde.pamd and ./kscreensaver.pamd These effect logging in with kdm
# and unlocking kscreensaver. See ./README.pam for more info.
# Become yourself again
exit
# Update your non-root account's environment
. /etc/profile.d/kde.sh
cd
rm -f installed/kde/kdebase-*.tar.* installed/kdebase-*.tar.*
mv kdebase-3.5.1.tar.bz2 installed/kde/