The Format of .kdesvn-buildrc
Prev
Next

Chapter 4. The Format of .kdesvn-buildrc

To use the script, you must have a file in your home directory called .kdesvn-buildrc, which describes the modules you would like to download and build.

It starts with the global options, specified like the following:

global
option-name option-value
[...]
end global

It is then followed by one or more module sections, specified like the following:

module module-name
option-name option-value
[...]
end module

module-name must be a module from the KDE Subversion repository (for example, kdelibs or kdebase). Some options override global options, some add to global options, and some global options simply cannot be overridden.

The following is an alphabetized list of options you can use. Click on the option to find out more about it. If one is not documented, please e-mail the authors using the address you can find above.

Here is a table of the various options, and some comments on them. Any option which overrides the global option will override a command line setting as well.

Table 4.1. Table of Options

Option-nameModule -> Global BehaviorNotes
apidoxOverrides global

Set this option to true in order to have Kdesvn-build automatically build and install the API documentation for the module after the normal build/install process. This only works for modules where make apidox does something, including kdelibs, kdebase and koffice, among others.

This option does not work for modules using Unsermake support, due to deficiencies in the Unsermake build system. This option does not work for KDE 4 modules because the required build system support has been migrated to a different program which Kdesvn-build has not been corrected to use yet.

apply-qt-patchesOverrides globalThis option is only useful for qt-copy. If it is set to a non-zero value, then the apply-patches script in qt-copy will be run prior to building, in order to apply the non-official patches to the qt-copy. Since these patches are normally the reason for using qt-copy instead of a stock Qt™, it should not do any harm to enable it. The default is to enable the patches.
asyncCannot be overridden

This option enables the asynchronous mode of operation, where the source code update and the build process will be performed in parallel, instead of waiting for all of the source code updates before starting the build process. This option defaults to enabling asynchronous mode. To disable, set this option to false

This option is available since the 1.7 release.

binpathOverrides global

Set this option to set the environment variable PATH while building. You cannot override this setting in a module option. The default value is /bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin. This environment variable should include the colon-separated paths of your development toolchain. The paths $KDEDIR/bin and $QTDIR/bin are automatically added. You may use the tilde (~) for any paths you add using this option.

branchOverrides global

Set this option to checkout from a branch of KDE instead of the default of trunk, where KDE development occurs. For instance, to checkout KDE 3.4 branch, you would set this option to 3.4.

Note that some modules use a different branch name. Notably, the required arts module does not go by KDE version numbers. The arts that accompanied KDE 3.4 was version 1.4.

If Kdesvn-build fails to properly download a branch with this option, you may have to manually specify the URL to download from using the override-url option.

build-dirOverrides globalUse this option to change the directory to contain the built sources. There are three different ways to use it:
  • Relative to the KDE Subversion source directory (see the source-dir option). This is the default, and the way the script worked up to version 0.61. This mode is selected if you type a directory name that does not start with a tilde (~) or a slash (/).

    The default value is build.

  • Absolute path. If you specify a path that begins with a /, then that path is used directly. For example, /tmp/kde-obj-dir/.

  • Relative to your home directory. If you specify a path that begins with a ~, then the path is used relative to your home directory, analogous to the shell's tilde-expansion. For example, ~/builddir would set the build directory to /home/user-name/builddir.

Perhaps surprisingly, this option can be changed per module.
checkout-onlyOverrides globalSet this option to checkout Subversion sources piece by piece. The value for this option should be a space separated list of directories to checkout. If you do not include the admin directory, it will automatically be included (if necessary). When checking out piece by piece, the admin directory will be pulled in from kde-common, which is where it exists on the Subversion server. Although this option overrides the global option, be aware that setting this as a global option makes no sense.
cmake-optionsAppends to global options (not applicable to qt-copy)

Use this option to specify what flags to pass to CMake when creating the build system for the module. When this is used as a global option, it is applied to all modules that this script builds. When used as a module option, it is added to the end of the global options. This allows you to specify common CMake options in the global section.

This option replaces configure-flags for all KDE 4 modules, since they use CMake to build.

Since these options are passed directly to the CMake command line, they should be given as they would be typed into CMake. For example:

  cmake-options -DRPATH_STYLE=default

Since this is a hassle, Kdesvn-build takes pains to ensure that as long as the rest of the options are set correctly, you should be able to leave this option blank.

configure-flagsAppends to global options (except for qt-copy)

Use this option to specify what flags to pass to ./configure when creating the build system for the module. When this is used as a global-option, it is applied to all modules that this script builds. qt-copy uses a much different set of configure options than the rest of KDE, so this option overrides the global settings when applied to qt-copy.

This option applies to qt-copy and all KDE 3 modules. KDE 4 modules use CMake, which is controlled using the cmake-options option.

colorful-outputCannot be overriddenSet this option to false to disable the colorful output of Kdesvn-build. This option defaults to true. Note that Kdesvn-build will not output the color codes to anything but a terminal (such as xterm, Konsole, or the normal Linux® console).
cxxflagsAppends to global optionUse this option to specify what flags to pass to ./configure as the CXXFLAGS when creating the build system for the module. This option is specified here instead of with configure-flags or cmake-options because this option will also set the environment variable CXXFLAGS during the build process.
dest-dirOverrides globalUse this option to change the name a module is given on disk. For example, if your module was extragear/network, you could rename it to extragear-network using this option. Note that although this changes the name of the module on disk, it is not a good idea to include directories or directory separators in the name as this will interfere with any build-dir or source-dir options.
disable-agent-checkCannot be overriddenNormally if you are using SSH to download the Subversion sources (such as if you are using the svn+ssh protocol), Kdesvn-build will try and make sure that if you are using ssh-agent, it is actually managing some SSH identities. This is to try and prevent SSH from asking for your pass phrase for every module. You can disable this check by setting disable-agent-check to true.
do-not-compileOverrides global

Use this option to set the DO_NOT_COMPILE environment variable prior to running the configure script. According to the KDE Developer FAQ, this should cause any top-level directory you pass to not be built. The directories should be space-separated.

Note that the sources to the programs will still be downloaded. You can use the checkout-only directive to choose directories that you want to check out.

Important

This option does not yet work with modules built using CMake.

email-addressCannot be overridden

Set this option to the e-mail address Kdesvn-build should send from should it ever need to send e-mail. You do not need to worry about this if you do not use any feature which send e-mail. (They are all disabled by default).

Currently only email-on-compile-error needs this option.

email-on-compile-errorCannot be overridden

You can set this option to the email address to send a report to when a module fails to build. Kdesvn-build will wait until all the modules are done and collate all of the results in the report. The report is only sent if a module fails to build.

Please see the email-address option to set the address Kdesvn-build should send from, since the default is usually not what you want.

inst-appsOverrides global

This is the opposite of the do-not-compile option. This option makes it so that only the given top-level directories are built. The directories should be space-separated.

Any changes do not take effect until the next time make -f Makefile.cvs is run, either automatically by the script, or manually by the --refresh-build or --recreate-configure options.

Important

This option does not yet work with modules built using the CMake build system.

Note that the sources to the programs will still be downloaded. You can use the checkout-only directive to choose directories that you want to check out.

install-after-buildOverrides globalThis option is used to install the package after it successfully builds. This option is enabled by default. If you want to disable this, you need to set this option to 0 in the configuration file. You can also use the --no-install command line flag.
kdedirOverrides globalThis option sets the directory that KDE will be installed to after it is built. It defaults to ~/kde. If you change this to a directory needing root access, you may want to read about the make-install-prefix option as well.
kde-languagesCannot be overridden

This option allows you to choose to download and install localization packages along with KDE. You might do this if you do not live in the United States and would like to KDE translated into your native language.

To use this option, set it to a space-separated list of languages to install. Each language has a language code associated with it, which you can look up at this page: http://i18n.kde.org/teams/.

It is alright to choose only one language. By default, none are downloaded, which means KDE will display in American English.

For instance, to choose to install French, you would set the option to something like: kde-languages fr. You would still need to use KControl in order to choose the French language, however.

libpathOverrides globalSet this option to set the environment variable LD_LIBRARY_PATH while building. You cannot override this setting in a module option. The default value is blank, but the paths $KDEDIR/lib and $QTDIR/lib are automatically added. You may use the tilde (~) for any paths you add using this option.
log-dirOverrides globalUse this option to change the directory used to hold the log files generated by the script. This setting can be set on a per-module basis as of version 0.64 or later.
make-install-prefixOverrides globalSet this variable to a space-separated list, which is interpreted as a command and its options to precede the make install command used to install modules. This is useful for installing packages with Sudo for example, but please be careful while dealing with root privileges.
make-optionsOverrides globalSet this variable in order to pass command line options to the make command. This is useful for programs such as distcc or systems with more than one processor core.
manual-buildOverrides globalSet the option value to true to keep the build process from attempting to build this module. It will still be kept up-to-date when updating from Subversion. This option is exactly equivalent to the --no-build command line option.
manual-updateOverrides globalSet the option value to true to keep the build process from attempting to update (and by extension, build or install) this module. If you set this option for a module, then you have pretty much commented it out.
module-base-pathOverrides global

Set this option to override Kdesvn-build's default directory path to the module in question. This can be used, for example, to pull specific branches or tagged versions of libraries. The KDE Source Viewer is invaluable in helping to pick the right path.

Note that Kdesvn-build constructs the final path according to the following template: $svn-server/home/kde/$module-base-path/$module-name.

The default value is either “trunk” or “trunk/KDE”, depending on the module name.

Tip

Use the branch or tag options instead whenever they are applicable.

nicenessCannot be overriddenSet this option to a number between 20 and 0. The higher the number, the lower a priority Kdesvn-build will set for itself. The default is 10.
no-svnOverrides globalIf this option is set to true then Kdesvn-build will not update the source code for the module automatically. It will still try to build the module if it normally would have tried anyways.
no-rebuild-on-failOverrides globalSet this option value to true to always prevent Kdesvn-build from trying to rebuild this module if it should fail an incremental build. Normally Kdesvn-build will try to rebuild the module from scratch to counteract the effect of a stray Subversion update messing up the build system.
override-urlOverrides globalIf you set this option, Kdesvn-build will use its value as the URL to pass to Subversion completely unchanged. You should generally use this if you want to download a specific release but Kdesvn-build cannot figure out what you mean using branch.
qtdirOverrides globalSet this option to set the environment variable QTDIR while building. You cannot override this setting in a module option. If you do not specify this option, it defaults to ${source-dir}/build/qt-copy, which uses the qt-copy module included in the KDE source repository. You may use a tilde (~) to represent your home directory.
remove-after-installOverrides global

If you are low on hard disk space, you may want to use this option in order to automatically delete the build directory (or both the source and build directories for one-time installs) after the module is successfully installed.

Possible values for this option are:

  • none - Do not delete anything (This is the default).

  • builddir - Delete the build directory, but not the source.

  • all - Delete both the source code and build directory.

Note that using this option can have a significant detrimental impact on both your bandwidth usage (if you use all) and the time taken to compile KDE, since Kdesvn-build will be unable to perform incremental builds.

revisionOverrides globalIf this option is set to a value other than 0 (zero), Kdesvn-build will force the Subversion update to bring the module to the exact revision given, even if options like branch are in effect. If the module is already at the given revision then it will not be updated further unless this option is changed or removed from the configuration.
set-envOverrides global

This option accepts a space-separated set of values, where the first value is the environment variable to set, and the rest of the values is what you want the variable set to. For example, to set the variable RONALD to McDonald, you would put in the appropriate section this command:

set-env RONALD McDonald

This option is special in that it can be repeated without overriding earlier set-env settings in the same section of the configuration file. This way you can set more than one environment variable per module (or globally).

source-dirOverrides globalThis option is used to set the directory on your computer to store the KDE Subversion sources at. If you do not specify this value, the default is ~/kdesvn. If you do specify this value, use an absolute path name.
stop-on-failureOverrides globalSet this option value to true to cause the script to stop execution after an error occurs during the build or install process. This option is off by default.
svn-serverOverrides globalThis option is used to set the server used to check out from Subversion. The default is the anonymous Subversion repository, svn://anonsvn.kde.org/
tagOverrides global

Use this option to download a specific release of a module.

Note: The odds are very good that you do not want to use this option. KDE releases are available in tarball form from The KDE FTP site or one of its mirrors.

If you are using Kdesvn-build because you have having trouble getting a KDE release to build on your distribution, consider using the Konstruct build tool instead, which works from the release tarballs.

unsermake-optionsOverrides globalThis option is just like make-options but for Unsermake, which accepts some options that Make cannot understand.
use-cmakeOverrides globalThis option was removed in Kdesvn-build 1.4 as all KDE 4 modules require CMake, and CMake use is not permitted on any other modules.
use-qt-builddir-hackOverrides globalAlthough this option overrides the global option, it only makes sense for qt-copy. Set this option to true to enable the script's srcdir != builddir mode. When enabled, Kdesvn-build will copy the qt-copy source module to the build directory, and perform builds from there. That means your QTDIR environment variable should be set to ${qt-copy-build-dir}/qt-copy/lib instead. You should also change your qtdir option accordingly. Incremental Make should still work in this mode, as the timestamps will be preserved after the copy. If you use the apply-qt-patches option, the patches will be applied in the build directory, not the source directory. This option defaults to true.
use-stable-kdeCannot be overridden

Since Kdesvn-build has support for building KDE 3 and 4, there needs to be some way to tell which version to build. By default, Kdesvn-build will build the main line of KDE development (called /trunk). But, this is for KDE 4, which is not yet ready for wide release.

You can use the branch option globally or for a module in order to download for KDE 3.5 (or 3.4, etc.). However, this is not convenient as some modules (such as kdesupport) are shared by 3.5 and 4. In addition, it is a lot of branch options that must be added to the configuration file.

So, if you set this global option to true, Kdesvn-build will automatically download the KDE 3.5 version of modules such as kdelibs and qt-copy, instead of downloading the KDE 4 version. You can still use the branch or tag options for a module to override the setting that Kdesvn-build picks. This way you can easily choose to download KDE 3.5 instead of the pre-release KDE 4.

use-unsermakeOverrides global

Set this option to true in order to use the experimental Unsermake program instead of Automake when running the configure script. This can lead to some serious decreases in build time, especially for distributed building systems. This option defaults to true (for most modules).

Normally if you use this option Kdesvn-build will automatically keep Unsermake up-to-date. This may start to get annoying, especially if you are managing Unsermake yourself. If this is the case, you can set this option to “self”, and Kdesvn-build will still use Unsermake, but will not do anything special to keep it updated.

Prev
Next
Contents


Would you like to make a comment or contribute an update to this page?
Send feedback to the KDE Docs Team