LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

kde-builder

tool for building KDE software from source repositories

TLDR

Set up kde-builder: install distro dependencies and generate the config
$ kde-builder --initial-setup
copy
Build a KDE project and its dependencies
$ kde-builder [project_name]
copy
Build without updating sources or building dependencies
$ kde-builder -SD [project_name]
copy
Clean build directories before compiling
$ kde-builder -c [project_name]
copy
Preview what would be done without doing it
$ kde-builder -p [project_name]
copy
Resume the build from a specific project
$ kde-builder -f [dependency_project] [project_name]
copy
Resume after fixing a failed build
$ kde-builder --resume
copy
Run a built program with the development environment
$ kde-builder --run [executable_name] [arguments]
copy
Install the Plasma login session files
$ kde-builder --install-login-session-only
copy

SYNOPSIS

kde-builder [options] [projects]

DESCRIPTION

kde-builder is a tool for building KDE software from source repositories. It handles dependency resolution, source updates, configuration, compilation and installation of KDE projects into a separate prefix.It can build individual applications or an entire Plasma desktop. Settings are read from kde-builder.yaml in the current directory or ~/.config/kde-builder.yaml.

PARAMETERS

--initial-setup

Install distro packages and generate the config file (same as --install-distro-packages --generate-config).
--generate-config
Generate the kde-builder.yaml configuration file.
-p, --pretend, --dry-run
Show what would be done without doing it.
-S, --no-src
Don't update source code.
-s, --src-only
Only update source code, don't build.
-d, --include-dependencies; -D, --no-include-dependencies
Build, or don't build, the projects' dependencies.
-c, --clean-build
Remove the build directory before building.
--reconfigure
Rerun CMake without cleaning the build directory.
-f, --resume-from PROJECT
Resume the build starting from the given project.
-a, --resume-after PROJECT
Resume the build starting after the given project.
--resume
Resume from the project that failed, without source updates.
--stop-before, --stop-after PROJECT
Stop the build before or after the given project.
--no-stop-on-failure
Continue building other projects if one fails.
--rebuild-failures
Build only the projects that failed in the previous run.
-!, --ignore-projects PROJECT...
Skip the given projects.
--run [-f] PROGRAM [ARGS]
Run a program with the environment of the install prefix; -f detaches it.
--install-login-session-only
Only install the Plasma login session files.
--dependency-tree PROJECT
Print the dependency tree of a project.
--rc-file FILE
Use a different config file.
--self-update
Update kde-builder itself via git pull.
-h, --help
Display help information.

CAVEATS

Requires significant disk space and build time. Automatic dependency installation only works on supported distributions. The -r/--refresh-build option of older versions was replaced by -c/--clean-build. Configuration moved from kdesrc-buildrc to YAML; existing files can be converted.

HISTORY

kde-builder is a Python rewrite of the Perl-based kdesrc-build, led by Andrew Shark and released in 2024. It replaced kdesrc-build as the tool recommended by KDE for building its software from source.

SEE ALSO

kdesrc-build(1), cmake(1), ninja(1)

RESOURCES

Copied to clipboard
Kai