Ok. I've done a scratch of it. You can check it and give me some feedback. My English is not very well so you will see lots of mistakes (hope not=).
I can't add attachments for you to download =(
[Admin Update] -- I am removing one attach and copying its content below, to make it more easy to read [/End of Admin Update]
Compiling KDE4 and QT4 from svn trunk under FEDORA 8
First, we need to decide where we want all this stuff stored. It takes quite a lot of space, to be honest. In my example I had all installation and source in /opt but you can change destination as you want. The places of such configuration will be pointed. Of cource, lots of stuff from kde official instruction will be repeated, but it is nothing said there about lunching kde4 as session.
So, in
I have installation of kde4 binaries.
In
obviously I have qt4 installed.
I would recomend you to create a separate user for maintaining all the stuff relating to kde4. It is not necessarily should be a kde-devel. Lets say it is kde-devel. In console with root privilege:
useradd -m kde-devel -s /bin/bash
passwd kde-devel
Now we need to make ssh working. Open in console:
su
mc //if you don't have it - #yum install -y mc
open file /etc/ssh/ssh_config
look for the line
and near it add
press F2 to save.
Than open /etc/ssh/sshd_config
Change line
to
Also, it is a good thing to add (or change) is
Thats it. Press F2 to save file, F10 to quite from mc.
Than type in:
You should see the daemon successfully stop and restart:
Stopping sshd: [ OK ]
Starting sshd: [ OK ]
If you get a "Permission denied" message, it is because you are using a faulty selinux-targeted-policy, which can be fixed by updating to the latest policy file:
yum -y update selinux-policy-targeted
Now we should have shh working.
Now is the time to prepare .bashrc
In my example there are only few vital lines for us.
27th line:
Make this folder anywhere you want. Remember: we need lots of space for installation.
37th line:
if you are copying .bashrc from official how-to page, don't forget to comment:
export PATH=$KDEDIR/bin:/usr/local/bin:$PATH
export LD_LIBRARY_PATH=$KDEDIR/lib:$LD_LIBRARY_PATH
and uncomment:
#export PATH=$KDEDIR/bin:$QTDIR/bin:/usr/local/bin:$PATH
#export LD_LIBRARY_PATH=$KDEDIR/lib:$QTDIR/lib:$LD_LIBRARY_PATH
66th line
export KDE_BUILD=/opt/kde4/build
basically it equal:
export KDE_BUILD=$KDEDIR/build
67th line
export KDE_SRC=/opt/source
80th line
you should't have a comand makeobj unless you have kdesdk installed. If you have it – uncomment the line.
I am not pretty sure for which purposes it is, but it is not bad idea to follow the off. Manual. /opt/source – the folder, where I have all the sources for kde and qt.
save the file .bashrc somewhere.
Open new console (you can exit from root login in previous console by typing #exit) and type:
ssh -X kde-devel@localhost
cp /{place where you saved your .bashrc}/.bashrc ~/.bashrc
source ~/.bashrc
check if everything is setup correct:
or
you should see folder you've setup.
Don't forget to create the folders for KDEDIR and QTDIR.
Now we need some rpm's to make it done:
in console:
yum install -y clucene-core-devel libxml-devel libxslt-devel \
dbus-devel boost-devel bzip2-devel openssl-devel alsa-lib-devel \
redland-devel rasqal-devel raptor-devel hspell-devel aspell-devel \
cups-devel xine-lib-devel avahi-devel gamin-devel OpenEXR-devel \
enchant-devel jasper-devel ilmbase-devel pcre-devel gpgme-devel \
libxklavier-devel glib-devel libusb-devel libsmbclient-devel \
libxcb-devel NetworkManager-devel lm_sensors-devel libraw1394-devel \
bluez-libs-devel gcc-c++ libXext-devel cmake subversion giflib-devel \
libpng-devel libXdamage-devel libXcomposite-devel libXrender-devel \
fontconfig-devel libXft-devel libXcursor-devel libXfixes-devel \
ruby-devel libXScrnSaver-devel libkdcraw-devel exiv2-devel \
lcms-devel libtiff-devel sqlite-devel libxkbfile-devel \
imlib2-devel patch gstreamer-plugins-base-devel
exit
ssh -X kde-devel@localhost
cd $KDE_SRC
svn checkout svn://anonsvn.kde.org/home/kde/trunk/qt-copy
cd qt-copy
./apply_patches
./configure -nomake examples -nomake demos -qt-gif \
-no-exceptions -debug -fast -prefix $QTDIR
make -j2 //if you have a 2 processors
make install
Now we must have qt4 installed in /opt/qt4
You can check it by typing:
qdbusviewer
this must lunch a program of our new installed qt4. Next,
cd $KDE_SRC
svn checkout svn://anonsvn.kde.org/home/kde/trunk/kdesupport/
cd kdesupport
cmakekde
cd $KDE_SRC
mkdir KDE && cd KDE
svn checkout svn://anonsvn.kde.org/home/kde/branches/KDE/4.0/kdelibs
cd kdelibs
cmakekde
cd $KDE_SRC/KDE
svn checkout svn://anonsvn.kde.org/home/kde/branches/KDE/4.0/kdepimlibs
cd kdepimlibs
cmakekde
cd $KDE_SRC/KDE
svn checkout svn://anonsvn.kde.org/home/kde/branches/KDE/4.0/kdebase
cd kdebase
cmakekde
The main installation is done. You can try some apps:
konqueror
you must see it!!
You may want some other apps for kde – such as kopete...
cd $KDE_SRC/KDE
svn checkout svn://anonsvn.kde.org/home/kde/branches/KDE/4.0/kdeutils
cd kdeutils
cmakekde
same applies for the rest – choose what you need:
svn://anonsvn.kde.org/home/kde/branches/KDE/4.0/kdeaccessibility
svn://anonsvn.kde.org/home/kde/branches/KDE/4.0/kdeadmin
svn://anonsvn.kde.org/home/kde/branches/KDE/4.0/kdegames
svn://anonsvn.kde.org/home/kde/branches/KDE/4.0/kdegraphics
svn://anonsvn.kde.org/home/kde/branches/KDE/4.0/kdemultimedia
svn://anonsvn.kde.org/home/kde/branches/KDE/4.0/kdenetwork
svn://anonsvn.kde.org/home/kde/branches/KDE/4.0/kdeutils
to make a kde4 session working for a user kde-devel if you use kdm login engine:
su
cp /opt/kde4/share/apps/kdm/sessions/kde.desktop /usr/share/xsessions/kde4.desktop
than it is a good idea to edit the file /usr/share/xsessions/kde4.desktop and change
Name=KDE
to
Name=KDE4
THAT'S IT. You can lunch kde4 session from kde-devel user. In kdm you need to change type of session to kde4.
Enjoy!!
P.S. In here I used much from
http://techbase.kde.org/Getting_Started/Build/KDE4
and
http://techbase.kde.org/index.php?title=...ts/.bashrc
and
http://techbase.kde.org/index.php?title=...DE4/Fedora
and
http://techbase.kde.org/index.php?title=...requisites
Additionally I want to mansion incredible web site with lots of help according FEDORA 8:
http://optics.csufresno.edu/~kriehn/fedo...html#howto
I used that page for configuring ssh. It may be usefull to know such place with helps which just make it work!!
P.P.S.
My .bashrc – copy from the beginning - #.bashrc:
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
###
## A script to setup some needed variables and functions for KDE 4 development.
## This should normally go in the ~/.bashrc file of your kde-devel user, so
## that it is executed when a session for that user is started.
##
## Example:
## su - kde-devel
## kwrite ~/.bashrc
## (then paste this file)
## exit
## su - kde-devel
##
## If you don't use a separate user, the first section with the
## environment variables should go into a separate file of course.
# KDE
export KDEDIR=/opt/kde4
export KDEHOME=$HOME/.kde4
export KDETMP=/tmp/$USER-kde4
mkdir -p $KDETMP
export KDEDIRS=$KDEDIR
export PKG_CONFIG_PATH=$KDEDIR/lib/pkgconfig:$PKG_CONFIG_PATH
# Qt
# only set Qt related variables if you compiled Qt on your own
# (which is discouraged). if you use the distro provided Qt, skip
# this section. Uncomment it if neccessary.
export QTDIR=/opt/qt4
#######
export QT_PLUGINS_DIR=$KDEDIR/lib/kde4/plugins:$QT_PLUGINS_DIR
#export QT_PLUGINS_DIR=/home/kde-devel/QT4/plugins:$QT_PLUGINS_DIR
#######
export PKG_CONFIG_PATH=$QTDIR/lib/pkgconfig:$PKG_CONFIG_PATH
# DBus
# only set DBUS related variables if you compiled dbus on your own
# (which is really discouraged). if you use the distro provided dbus,
# skip this variable. Uncomment it if neccessary.
#export DBUSDIR=$KDEDIR
#export PKG_CONFIG_PATH=$DBUSDIR/lib/pkgconfig:$PKG_CONFIG_PATH
# Other
# you might want to remove $PATH from the end of this line and add any
# essential items from your path - to make sure the your kde3 path isn't
# in here. Use the commented versions if you defined QTDIR above.
export PATH=$KDEDIR/bin:$QTDIR/bin:/usr/local/bin:$PATH
export LD_LIBRARY_PATH=$KDEDIR/lib:$QTDIR/lib:$LD_LIBRARY_PATH
#export PATH=$KDEDIR/bin:/usr/local/bin:$PATH
#export LD_LIBRARY_PATH=$KDEDIR/lib:$LD_LIBRARY_PATH
# only needed on some strange systems for compiling Qt. do not set
# it unless you have to.
#export YACC='byacc -d'
# XDG
unset XDG_DATA_DIRS # to avoid seeing kde3 files from /usr
unset XDG_CONFIG_DIRS
# build and src folders
# you might want to change these!
export KDE_BUILD=/opt/kde4/build
export KDE_SRC=/opt/source
# This will make the debug output prettier
export KDE_COLOR_DEBUG=1
export QTEST_COLORED=1
# Make
# Tell many scripts how to switch from source dir to build dir:
export OBJ_REPLACEMENT="s#$KDE_SRC#$KDE_BUILD#"
# Use makeobj instead of make, to automatically switch to the build dir.
# If you don't have makeobj, install the package named kdesdk-scripts or
# kdesdk, or check out kdesdk/scripts from svn, or just don't set the alias
# yet.
#alias make=makeobj
##
# IMPORTANT! Uncomment the following lines if DBus does not work. DBus is not
# working if, when you run `dbus-uuidgen --ensure && qdbus`, you get an error.
#
# alias dbusstart="eval `PATH=$DBUSDIR/bin \
# $DBUSDIR/bin/dbus-launch --auto-syntax`"
##
# A function to easily build the current directory of KDE.
#
# This builds only the sources in the current ~/{src,build}/KDE subdirectory.
# Usage: cs KDE/kdebase && cmakekde
# will build/rebuild the sources in ~/src/KDE/kdebase
#
function cmakekde {
if test -n "$1"; then
# srcFolder is defined via command line argument
srcFolder="$1"
else
# get srcFolder for current dir
srcFolder=`pwd | sed -e s,$KDE_BUILD,$KDE_SRC,`
fi
# we are in the src folder, change to build directory
# Alternatively, we could just use makeobj in the commands below...
current=`pwd`
if [ "$srcFolder" = "$current" ]; then
cb
fi
# to enable tests, add -DKDE4_BUILD_TESTS=TRUE to the next line.
# you can also change "debugfull" to "debug" to save disk space.
# added "nice make..." to allow the user to work on the box while
# compiling
# Note: To speed up compiling, change 'make -j2' to 'make -jx',
# where x is your number of processors +1
cmake "$srcFolder" -GKDevelop3 -DCMAKE_INSTALL_PREFIX=$KDEDIR \
-DKDE4_BUILD_TESTS=TRUE -DCMAKE_BUILD_TYPE=debugfull&& \
nice make -j2 && \
make install;
}
##
# for the lazy ones, add/comment other directories
function cmakekdeall {
cs kdesupport && svn up && cmakekde
cs KDE/kdelibs && svn up && cmakekde
cs KDE/kdepimlibs && svn up && cmakekde
cs KDE/kdebase && svn up && cmakekde
cs KDE/kdepim && svn up && cmakekde
cs KDE/kdegraphics && svn up && cmakekde
cs KDE/kdemultimedia && svn up && cmakekde
cs KDE/kdenetwork && svn up && cmakekde
cs KDE/kdeutils && svn up && cmakekde
}
##
# A function to easily change to the build directory.
# Usage: cb KDE/kdebase
# will change to $KDE_BUILD/KDE/kdebase
# Usage: cb
# will simply go to the build folder if you are currently in a src folder
# Example:
# $ pwd
# /home/user/src/KDE/kdebase
# $ cb && pwd
# /home/user/build/KDE/kdebase
#
function cb {
# Make sure build directory exists.
mkdir -p "$KDE_BUILD"
# command line argument
if test -n "$1"; then
cd "$KDE_BUILD/$1"
return
fi
# substitute src dir with build dir
dest=`pwd | sed -e s,$KDE_SRC,$KDE_BUILD,`
if test ! -d "$dest"; then
# build directory does not exist, create
mkdir -p "$dest"
fi
cd "$dest"
}
##
# Change to the source directory. Same as cb, except this
# switches to $KDE_SRC instead of $KDE_BUILD.
# Usage: cs KDE/kdebase
# will change to $KDE_SRC/KDE/kdebase
# Usage: cs
# will simply go to the source folder if you are currently in a build folder
# Example:
# $ pwd
# /home/user/build/KDE/kdebase
# $ cs && pwd
# /home/user/src/KDE/kdebase
#
function cs {
# Make sure source directory exists.
mkdir -p "$KDE_SRC"
# command line argument
if test -n "$1"; then
cd "$KDE_SRC/$1"
else
# substitute build dir with src dir
dest=`pwd | sed -e s,$KDE_BUILD,$KDE_SRC,`
current=`pwd`
if [ "$dest" = "$current" ]; then
cd "$KDE_SRC"
else
cd "$dest"
fi
fi
}
##
# Add autocompletion to cs function
#
function _cs_scandir
{
base=$1
ext=$2
if [ -d $base ]; then
for d in `ls $base`; do
if [ -d $base/$d ]; then
dirs="$dirs $ext$d/"
fi
done
fi
}
function _cs()
{
local cur dirs
_cs_scandir "$KDE_SRC"
_cs_scandir "$KDE_SRC/KDE" "KDE/"
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
COMPREPLY=( $(compgen -W "${dirs}" -- ${cur}) )
}
# Remove comment on next line to enable cs autocompletion
#complete -F _cs cs
function start3app {
mkdir -p /tmp/$USER-kde
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games:$KDEDIR/bin:/home/kde-devel/QT4/bin
export LD_LIBRARY_PATH=
export KDETMP=/tmp/$USER-kde
export KDEVARTMP=/var/tmp/$USER-kde
export KDEHOME=$HOME/.kde
export KDEDIR=/usr
export KDEDIRS=$KDEDIR
export DISPLAY=:0
eval "$@"
source $HOME/.bashrc #Reset environment variables again
}