Getting Started/Build/Historic/KDE4
Build Recipes
The recipes provided here should be used when following the Build pages for KDE Software. These recipes will not be repeated in the Build pages, only variations from the standard recipe will be documented, usually just the git or svn repository address, but sometimes also additional configuration options.
The Easy Recipe relies on you setting up your environment according to the KDE recommendations. This will give you many shortcuts to save on typing. See the Build Environment section on how to do this.
The Full Recipe is provided for those who wish to control their own build or want to see the full steps required, and don't mind lots of typing.
In Git many KDE Modules have been split up into separate Projects for each Application or Library. Putting all the Git Projects into the same source directory would get very messy. To help keep everything easy to update the recipe recommends you organize the Projects into separate sub-directories for each Module.
For Subversion the repository address changes if you have a developers account or if you want a stable release.
For Git the repository address does not change if you have a developers account or if you want a stable release, you always clone the project from anongit. However a stable build requires some extra steps.
Easy Recipe
Git Unstable Master
This will be the most commonly used version of the Easy Recipe.
cd $KDE_SRC/master/<module> git clone kde:<project>.git cd <project> kdebuild
Git Unstable Branch
This recipe uses the same Git clone as your main Unstable Master build but allows you to build a specific development branch you may be interested in. It assumes you have already cloned the project repository. Use 'git branch -r' to find out the available development branches.
cd $KDE_SRC/master/<module>/<project> git branch --track <branch> origin/<branch> git checkout <branch> kdebuild
Git Stable Branch
This recipe uses git-new-workdir script to set up a separate work directory for working on the stable branch. This will save excessive rebuilding when switching between stable and unstable and uses less space than a separate clone.
The stable branch name will be of the form 'KDE/4.6' or '4.6' depending on the Project. Use 'git branch -r' to find out the available release branches.
cd $KDE_SRC/master/<module> git-new-workdir <project> $KDE_SRC/<stable-branch>/<module>/<project> <stable-branch> cd $KDE_SRC/<stable-branch>/<module>/<project> kdebuild
An example git-new-workdir command for KDE SC 4.6 would be:
git-new-workdir ~/kde/src/master/kdelibs ~/kde/src/4.6/kdelibs KDE/4.6
Subversion Unstable
cd $KDE_SRC/master svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/<module> cd <module> kdebuild
If you have a developer account the Subversion command will be:
svn checkout svn+ssh://<username>@svn.kde.org/home/kde/trunk/KDE/<module>
Subversion Stable
cd $KDE_SRC/<stable-branch> svn checkout svn://anonsvn.kde.org/home/kde/branches/KDE/<branch>/<module> cd <module> kdebuild
If you have a developer account the Subversion command will be:
svn checkout svn+ssh://<username>@svn.kde.org/home/kde/branches/KDE/<branch>/<module>
Full Recipe
Git Unstable Master
This will be the most commonly used version of the Full Recipe.
cd <your source root directory> git clone git://anongit.kde.org/<module>.git cd <your build root directory, or the module source dir> mkdir <your module build dir> cd <your module build dir> cmake <path to your module source dir> \ -DCMAKE_INSTALL_PREFIX=$KDEDIR \ -DCMAKE_BUILD_TYPE=debugfull \ -DKDE4_BUILD_TESTS=TRUE nice make -j2 # for faster compiles use -j(X+1)' where X is your number of processor cores make install
Git Unstable Branch
This recipe uses the same Git clone as your main Unstable Master build but allows you to build a specific development branch you may be interested in. It assumes you have already cloned the project repository. Use 'git branch -r' to find out the available development branches.
cd <your project source directory> git branch --track <branch> origin/<branch> git checkout <branch> cd <your module build dir> cmake <path to your module source dir> \ -DCMAKE_INSTALL_PREFIX=$KDEDIR \ -DCMAKE_BUILD_TYPE=debugfull \ -DKDE4_BUILD_TESTS=TRUE nice make -j2 # for faster compiles use -j(X+1)' where X is your number of processor cores make install
Git Stable Branch
This recipe uses git-new-workdir script to set up a separate work directory for working on the stable branch. This will save excessive rebuilding when switching between stable and unstable and uses less space than a separate clone.
The stable branch name will be of the form 'KDE/4.6' or '4.6' depending on the Project. Use 'git branch -r' to find out the available release branches.
cd $KDE_SRC/master/<module> git-new-workdir <project> $KDE_SRC/<stable-branch>/<module>/<project> <stable-branch> cd <your build branch directory, or the module source dir> mkdir <your module build dir> cd <your module build dir> cmake <path to your module source dir> \ -DCMAKE_INSTALL_PREFIX=$KDEDIR \ -DCMAKE_BUILD_TYPE=debugfull \ -DKDE4_BUILD_TESTS=TRUE nice make -j2 # for faster compiles use -j(X+1)' where X is your number of processor cores make install
An example git-new-workdir command for KDE SC 4.6 would be:
git-new-workdir ~/kde/src/master/kdelibs ~/kde/src/4.6/kdelibs KDE/4.6
Subversion Unstable
cd <your source root directory> svn checkout svn://anonsvn.kde.org/home/kde/trunk/KDE/<module> cd <project> git branch --track <stable-branch> origin/<stable-branch> git checkout <stable-branch> cd <your build root directory, or the module source dir> mkdir <your module build dir> cd <your module build dir> cmake <path to your module source dir> \ -DCMAKE_INSTALL_PREFIX=$KDEDIR \ -DCMAKE_BUILD_TYPE=debugfull \ -DKDE4_BUILD_TESTS=TRUE nice make -j2 # for faster compiles use -j(X+1)' where X is your number of processor cores make install
If you have a developer account the Subversion command will be:
svn checkout svn+ssh://<username>@svn.kde.org/home/kde/trunk/KDE/<module>
Subversion Stable
cd <your source branch directory> svn checkout svn://anonsvn.kde.org/home/kde/branches/KDE/<branch>/<module> cd <project> git branch --track <stable-branch> origin/<stable-branch> git checkout <stable-branch> cd <your build branch directory, or the module source dir> mkdir <your module build dir> cd <your module build dir> cmake <path to your module source dir> \ -DCMAKE_INSTALL_PREFIX=$KDEDIR \ -DCMAKE_BUILD_TYPE=debugfull \ -DKDE4_BUILD_TESTS=TRUE nice make -j2 # for faster compiles use -j(X+1)' where X is your number of processor cores make install
If you have a developer account the Subversion command will be:
svn checkout svn+ssh://<username>@svn.kde.org/home/kde/branches/KDE/<branch>/<module>
Useful Tips
make /fast
If you want to recompile part of a module without rebuilding any other parts of a module that it uses then you can pass make the /fast option.
For example if you just want to rebuild the contentes of kdelibs/kdeui without rebuilding the contents of kdelibs/kdecore that it uses, then simply do:
make kdeui/fast make install/fast