kdecvs-build is a Perl script to help users install KDE from CVS. Unlike the two scripts available at http://developer.kde.org/build/compile_cvs.html, this script neither requires nor uses CVSup, for those who either can't or don't feel like installing it.
It is authored by Michael Pyne (mpyne (AT) grammarian (DOT) homelinux (DOT) net), and is one of several build scripts for this purpose.
2004-Jun-17: v$VERSION
New features:
2004-Jun-15: v0.73-pre1
Bugfixes:
2004-Jun-13: v0.72 -- This Should Work Edition™
Bugfixes:
2004-Jun-12: v0.71
This release is dedicated to the heavy testing given the script by berkus and
mornfall. Thanks guys!
I recommend that you set up a separate user account if you decide to run KDE from CVS. I didn't at first, and I won't repeat that mistake for KDE 3.3 ;-). I would also recommend that you add this script to your crontab so that you don't have to worry about manually running the build process. The script employs locking to prevent parallel execution. You also need to follow the instructions on http://developer.kde.org/source/anoncvs.html to set up your .cvsrc and .cvspass. You should also follow the instructions on that page regarding setting up your own repository, especially if you intend to use qt-copy. Make sure that qt-copy, arts, kdelibs, and kdebase are listed in that order in your configuration file. If you perform a single-user install of kdecvs-build, all you have to do to download, build, and install KDE from CVS (assuming no build errors) is to run the script.
$ kdecvs-build
If you perform a system-wide installation, you can run the entire script as root, although I would recommend using your distribution's packages or Konstruct to install a stable KDE.
Features that I can think of off the top of my head:
qtdir ~/kdecvs/qt-copy
system()
call, so I would not recommend running it as root at this point.Things that kdecvs-build does NOT do:
To use the script, you must have a file in your home directory called .kdecvs-buildrc, which describes the modules you'd 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 CVS repository (for example, kdelibs or kdebase). Some options override global options, some add to global options, and some global options simply can't 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 me 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.
| Option-name | Module -> Global Behavior | Notes |
| apply-qt-patches | Overrides global | This 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 shouldn't do any harm to enable it. |
| binpath | Can't be overridden | Set this option to set the environment variable PATH while building. You can't override this setting in a module option. The default value is empty, which is likely not what you want. 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. On my system, the setting binpath /bin:/usr/bin:/usr/X11R6/binis the minimally sufficient setting. |
| build-dir | Overrides global | Use this option to change the directory to contain the built sources. There
are three different ways to use it:
|
| build-system-only | Overrides global | Set this option to only create the build system for this module. What that
means is that the make -f Makefile.cvs command will be run, and
the configure script will be created (but not run), and make will not be run.
This option is exactly equivalent to the --build-system-only command line option.
This command is useful for checking what configure-flags each module supports
so you can change your ~/.kdecvs-buildrc.
|
| checkout-only | Overrides global | Set this option to checkout CVS sources piece by piece. The value for this option should be a space separated list of directories to checkout. If you don't include the admin directory, it will automatically be prepended, as it is required by the KDE build system. When checking out piece by piece, the admin directory will be pulled in from kde-common, which is where it exists on the CVS server. Although this option overrides the global option, be aware that setting this as a global option makes no sense. |
| configure-flags | Appends to global option (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. |
| cvs-root | Can't be overridden | This option is used to set the directory on your computer to store the KDE CVS sources at. If you don't specify this value, the default is ~/kdecvs. If you do specify this value, use an absolute path name. Note that this setting has nothing to do with the CVSROOT environment variable. For that, see cvs-server. |
| cvs-server | Can't be overridden | This option is used to set the server used to check out from CVS. As an
example, you could try :pserver:anonymous@bluemchen.kde.org:/home/kde Please see http://developer.kde.org/source/anoncvs.html for a list of CVS mirrors. It also has links to other CVS build scripts that you can try. |
| cxxflags | Appends to global option | Use 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 because this option will also set the environment variable CXXFLAGS during the build process. |
| debug | Can't be overridden | This option enables the script's debug mode. At this point, all this switch does is disable logging to files, instead dumping all output to stdout. |
| disable-build-list | Can't be overridden | Normally kdecvs-build will write out the list of modules that were successfully built to a file under the KDE CVS source directory called 'successfully-built'. If you set this option to 0, kdecvs-build will skip writing out the file. |
| do-not-compile | Overrides 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 toplevel 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. |
| install-after-build | Overrides global | This 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. |
| kdedir | Can't be overridden | Set this option to set the environment variable KDEDIR while building. This is useful for one-user installations of KDE. See http://developer.kde.org/build/build2ver.html. You can't override this setting in a module option. If you don't specify this option, it defaults to absolutely nothing, which will mess up the configure script. You may use a tilde (~) to represent your home directory. |
| libpath | Can't be overridden | Set this option to set the environment variable LD_LIBRARY_PATH while building. You can't 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. |
| lockfile | Can't be overridden |
The path of a file to use for script locking, to prevent parallel execution. If you don't specify this value, the default is ~/.kdecvs-lock If the script is unable to create this file, it will abort. |
| log-dir | Overrides global | Use 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. |
| make-install-prefix | Overrides global | Set 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-options | Overrides global | Set this variable in order to pass command line options to the make command. This is useful for programs such as distcc. distcc allows you to share your compilation work among more than one computer. To use it, you must use the -j option to make. Now you can. According to the docs, 2 * number_of_network_cpus is recommended. I have 2 CPUs total, so it would be -j4 in my case. |
| make-output-file | Overrides global | DEPRECATED. As of version 0.6, this option is no longer used. Now all commands are logged, including the make process. You can use the log-dir option to change the logging directory, however. |
| manual-build | Overrides global | Set 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 CVS. This option is exactly equivalent to the --no-build command line option. |
| no-cvs | Overrides global | Set this option value to 'true' to prevent CVS updates for the module. This option is exactly equivalent to the --no-cvs command line option. |
| no-rebuild-on-fail | Overrides global | Set this option value to 'true' to always prevent kdecvs-build from trying to rebuild this module if it should fail an incremental build. Normally kdecvs-build will try to rebuild the module from scratch to counteract the effect of a stray CVS update messing up the build system. |
| pretend | Can't be overridden | Set the option value to 'true' in order to "fake" the update/build or install process. This setting results in verbose output, and is exactly equivalent to the --pretend command line option. |
| qtdir | Can't be overridden | Set this option to set the environment variable QTDIR while building. You can't override this setting in a module option. If you don't specify this option, it defaults to absolutely nothing, which will mess up the configure script. You may use a tilde (~) to represent your home directory. |
| recreate-configure | Overrides global | Use this option to re-run make -f Makefile.cvs and then reconfigure the module before building. Note that setting this option in the configuration file isn't a great idea, use --recreate-configure on the command line instead. |
| release-tag | Overrides global | Use this option to force checkout from a specific KDE CVS branch. For example, setting this to KDE_3_2_BRANCH allows you to keep up-to-date with the current stable KDE release, including bugfixes. You can use KDE's WebCVS page to find out what branches exist for each CVS module. |
| reconfigure | Overrides global | Use this option to reconfigure the module before building. Note that setting this option in the configuration file isn't a great idea, use --reconfigure on the command line instead. |
| refresh-build | Overrides global | Set this option value to 'true' to cause the build system for this module to start from scratch every time the script is run. This option is exactly equivalent to the --refresh-build command line option. |
| stop-on-failure | Overrides global | Set 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. |
| use-qt-builddir-hack | Overrides global | Although this option overrides the global option, it only makes sense for
qt-copy. Set this option to 'true' to enable the script's experimental
srcdir != builddir mode. When enabled, kdecvs-build will copy the qt-copy CVS
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. |
| use-unsermake | Overrides global | Set this option to a non-zero value 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. |
The script accepts the following command-line options:
make -f
Makefile.cvs again to create the configure script, and continue
building as normal. This option implies --reconfigure.