Table of Contents
To use the script, you must have a file in your home directory called
.kdesrc-buildrc, which describes the modules you would
like to download and build, and any options or configuration parameters to
use for these modules.
The configuration file starts with the global options, specified like the following:
It is then followed by one or more module sections, specified in one of the following two forms:
module-names# Other options may also be set
Note that the second form, module sets, only works for Git-based modules.
For Subversion modules,
module-name must be a module
from the KDE Subversion repository (for example, kdeartwork or
kde-wallpapers), although it is possible to get around this if you
manually specify the Subversion URL.
For Git modules, the module name can be essentially whatever you'd like, as long as it does not duplicate any other module name in the configuration. Keep in mind the source and build directory layout will be based on the module name if you do not use the dest-dir option.
There is a final type of configuration file entry,
options groups, which may be given wherever a
module-set may be used.
options group may have options set for it just like
a module declaration, and is associated with an existing module. Any options
set these way will be used to override options set for the
The associated module name must match the
name given in the
options declaration. Be careful of
mis-typing the name.
This is useful to allow for declaring an entire
module-set worth of modules, all using the same options, and
options groups to make individual changes.
options groups can also apply to named module sets.
This allows expert users to use a common configuration file (which includes
module-set declarations) as a baseline, and then make changes
to the options used by those module-sets in configuration files that
include command to reference
the base configuration.
Example 4.1. Example of using options
In this example we choose to build all modules from the KDE multimedia software grouping. However we want to use a different version of the KMix application (perhaps for testing a bug fix). It works as follows:
masterend module-set # kmix is a part of kde/kdemultimedia group, even though we never named # kmix earlier in this file, kdesrc-build will figure out the change. options
Now when you run kdesrc-build, all of the KDE multimedia programs will
be built from the “master” branch of the source repository, but
KMix will be built from the older “KDE/4.12” branch. By using
options you didn't have to individually list all the
other KDE multimedia programs to give them the right
Note that this feature is only available in kdesrc-build from version 1.16, or using the development version of kdesrc-build after 2014-01-12.
Within the configuration file, you may reference other files by using the
include keyword with a file, which will act as if the file
referenced had been inserted into the configuration file at that point.
For example, you could have something like this:
~/common-kdesrc-build-options# Insert specific options here. end global
If you don't specify the full path to the file to include, then the file will be searched for starting from the directory containing the source file. This works recursively as well.
The following is a list of commonly-used options. Click on the option to find out more about it. To see the full list of options, see the section called “Table of available configuration options”.
cmake-options to define what flags to configure a module with using CMake.
branch, to checkout from a branch instead of /trunk (for Subversion) or
configure-flags to define what flags to configure Qt™ with.
kdedir, to set the directory to install KDE to.
make-options, to pass options to the Make program (such as number of CPUs to use).
qtdir, to set the path to Qt™.
source-dir, to change where to download the source code to.