Build-Tool Recipe: Build KDE (4.8.3) From Releases
There is a new recipe for build-tool that makes it possible to build kde from the release packages found in ftp.kde.org.
Before i delve into the details some words about the new recipe. I intend to provide a way to build all releases available on ftp.kde.org from one recipe. That is currently not possible because of the way build-tool works. It clones a branch named after the used build-tool version from the repository and builds the recipe present there. I would like to have the different releases as branches in the same repository. So i need to add a way to switch between those branches in the next build-tool release. Currently the revision build is hardcoded to 4.8.3 in the recipe.
Get The Recipe
I assume build-tool is already installed. If not head over to build-tools how to get it documentation.
The command needed to get the new recipe is
$ build-tool1.9 recipe add https://git.gitorious.org/build-tool/kde-release-recipe.git kde-release.
Activate The Recipe
Now that the new recipe is available (check
build-tool1.9 recipe list) we have to activate it. It is possible to activate a recipe more than once. Use case is to compile with different configurations. The first kde-release is the name used when getting the recipe. The second optional is the name to use for the build script.
$ build-tool1.9 recipe install kde-release kde-release
This command will ask you some questions and open a editor to give you the possibility to change some configuration values. It is safe to close the editor without changes if you are confused about the file format. You can afterwards manually check the configuration with the following commands.
kde-release-build configuration list [-v]
- Show all configuration values. The optional
-vprecedes each value with a comment explaining its meaning.
kde-release-build configuration edit MAKEFLAGS
- Opens a editor for the MAKEFLAGS configuration setting. The same ugly yaml format. But easier to read because much shorter.
kde-release-build configuration edit
- Opens a editor for the all configuration setting. You seen this before.
Carefully examine at least MAKEFLAGS, CMAKE_PREFIX_PATH, KDE_PREFIX and BUILD_DIR.
A complete reference of all commands can be found at Command Reference. Check at least lsmod, lsfeat, module enable, module disable, feature enable and feature disable.
Now it is time to build. This is where things get really complicated: Dependencies. Since the recipe currently builds 4.8.3 which is not bleeding edge it is easy to get the dependencies installed on opensuse. The command
sudo zypper in -d kdelibs4 will do that for you.
The next command first lists the modules in build order and then starts the build.
$ kde-release-build lsmod --no-sort workspace/ A? workspace/oxygen-icons : No description specified A? workspace/kdelibs : The KDE Library. A? workspace/kdepimlibs : s Personal Information Management Libraries. A? workspace/kdebase/runtime : Plugins and applications necessary for the running of KDE applications. A? workspace/kdebase/kactivities : API for using and interacting with Activities. A? workspace/kdebase/workspace : Provides the interface and basic tools for the KDE workspace. A? workspace/kdebase/apps : Collection of applications used for file and Internet browsing. $ kde-release-build build -u workspace/
Hopefully all is good after that. Have a look at the build-tool documentation. The quick start page especially. If you miss some modules and can't find them in the recipe please tell me. Try to use distribution packages for as many dependencies as possible. All/most of the qt stuff should come from the distribution.
The recipe currently contains some qt and kdesupport stuff disabled. They should not be necessary for 4.8.3. But they will be for the next 4.9 release.