The kdesvn-build program, which is used to download, build, and install KDE from the KDE source repository, uses a file called kdesvn-buildrc in order to control what is downloaded and built, what options are used, and where KDE is installed to.
This is a description of how to use kdesvn-buildrc.
The kdesvn-build download will include a file called kdesvn-buildrc-sample, which is a sample configuration file suitable for building KDE 4.
To create your configuration, it is recommended to use this file as a base since it includes the standard list of KDE modules to build, in the correct order. (You can, of course, add or remove most modules if you like).
You can use any standard text editor to edit this file, such as KWrite, nano, vi, etc.
Once you open the file, you will see that it starts with some comments (on lines beginning with #), and then the world "global". This starts the global configuration for the kdesvn-buildrc, which is used to specify options which are common to all of the modules.
Each option in the global section is specified in the following form:
Many options are already listed, with default values, and comments about the option on top. Some options have more than one sample value listed. In this situation, all but one of these will have comments. If you want to use a different sample option, simply uncomment the line by deleting the '#' at the beginning, and commenting or deleting the other lines with the same option name.
Here's a short listing of some of the important global options:
Note |
---|
As you can see, there are three different major directories, source, build, and install. The build directory is used to keep the source directory clean and to hold intermediate files that don't get installed |
Tip |
---|
You can use ~/ in these options to represent your home directory |
Tip |
---|
qt-copy is a copy of the Qt source code in the KDE repository, which can optionally also have some bugfix patches applied |
If this is the case for you, you can use this option (either globally, or for each module) to run make install using sudo, or su, etc.
After the global options are all done, you'll see the line "end global", which lets kdesvn-build know that all of the global options have been read.
Next in the kdesvn-buildrc are the module options. First off, modules are listed in the file, in the order they are to be built and installed. Each module is listed in the following format:
The module-name is how kdesvn-build refers to the module. It should match the name of the module you are downloading from the source repository. Base KDE modules are listed in WebSVN. Other modules are also available in WebSVN.
For each module you can specify options, in the same fashion as for the global options. Most of the time, if you set an option for a module, it completely overrides the global option, if any.
However, the cmake-options for a module is added to the global cmake-options, instead of replacing it, which allows you to avoid having to give the same cmake-options for all of your modules.
Tip |
---|
{{{1}}} |
The qt-copy module is special in that it uses configure-options instead of cmake-options, and it never inherits compilation flags that are set globally, since qt-copy uses a different build system than KDE does. The sample kdesvn-buildrc contains a useful set of default configure flags, but if you aren't using qt-copy, you can simply comment the entire qt-copy module out.
Tip |
---|
If you get the warning from kdesvn-build that a certain module is not listed in the kdesvn-buildrc, make sure that you've added it to the kdesvn-buildrc, even if you have no options for it. If it's already in the kdesvn-buildrc, make sure you spelled the module name right on the command line. |
kdesvn-build will search in several locations for your rc file.