Build-Tool provides a command called build-tool. This command is not able to compile anything. It is used to maintain and use recipes. So lets see which recipes currently are provided.
<pre>$ build-tool recipes list </pre>
None. All recipes should be external to the script. Get the kde recipe with
<pre> build-tool recipe add git://gitorious.org/build-tool/kde-trunk-recipe.git kde </re>
Let's start with the kde recipe. To use a recipe we have to install it first. We can get some insight without installing it.
<pre>$ build-tool recipe info kde Description: Build the kde 4.x development branch. Website: <a href="http://www.kde.org Repository:" title="http://www.kde.org Repository:">http://www.kde.org Repository:</a> svn://anonsvn.kde.org/home/kde/trunk Browse Repository: <a href="http://websvn.kde.org/trunk Long" title="http://websvn.kde.org/trunk Long">http://websvn.kde.org/trunk Long</a> Description: A recipe to build the kde4 development branch. The core modules and some additional extragear and playground modules are provided. Warning: This is the development branch for the next kde release. It is not necessarily stable!</pre>
And to install it.
<pre>$ build-tool recipes install kde Step 1) Add a symbolic link name 'kde-build' somewhere into your $PATH. Exactly one writeable directory found in your $PATH. Symbolic link will be created in : $HOME/bin Step 2) Create a example configuration file. Please open the file in a editor and change it to your preferences. It is important to at least set LIB_SUFFIX and MAKEFLAGS to values your system needs or can handle. LIB_SUFFIX is either '64', '32' or ''. Issue 'gcc -v' and search for --libdir=lib(64|32|). Set LIB_SUFFIX accordingly. If you can't see --libdir set LIB_SUFFIX to "". Those information is only correct if you not use the -m32 Generate 32bit i386 code -m64 Generate 64bit x86-64 code gcc options. MAKEFLAGS can be used provide flags to the make command. The '-jN' options is used to parallelize the compiling. Set N to your the number of cpu cores+1 for a start. You will find the file at /home/mjansen/.build-tool/kde.yaml. chmod 100644 Step 3) Creating a local configuration file you can use to change very aspect from the global configuration file, You will find it at > /home/mjansen/.build-tool/kde/recipe chmod 100644 Step 4) You now can start to use your recipe. The first command to look at are: # Show the configuration > kde-build info # Show all modules > kde-build module list # Show detailed info for a module > kde-build module info <module> # Build a module (-u = enable updating) > kde-build build -u <module> </pre>
Read the text carefully to understand what happened and adjust the configuration file. If you don't have a writable directory in your PATH variable you have to either change that and run the command again (it will not override anything) or create a symlink yourself. The command will tell you how to do that.
Use the command lsmods which is a shorthand for modules list to get a list of the available modules.
<pre>$ kde-build lsmods kdesupport/automoc : no description kdesupport/polkit-qt : no description kdesupport/soprano : no description kdesupport/akonadi : no description kdesupport/phonon : no description kdesupport/dbusmenu-qt : no description kdesupport/strigi : no description kdesupport/attica : no description kdesupport/oscaf : no description kdesupport/taglib : no description kdesupport/taglib-extras : no description kdesupport/oxygen-icons : no description KDE/kdelibs : no description KDE/kdepimlibs : no description KDE/kdebase/runtime : no description KDE/kdebase/workspace : no description KDE/kdebase/apps : no description KDE/kdepim : no description kdeedu : no description kdegames : no description </pre>
Those - currently useless - descriptions are the forebringers of a feature which is not yet implemented. Let's have a more detailed look at the KDE/kdelibs module.
<pre>$ kde-build module info KDE/kdelibs #### Module KDE/kdelibs Active: true Repository: svn://anonsvn.kde.org/home/kde/trunk/KDE/kdelibs Local Checkout: /home/mjansen/kde/trunk/src/KDE/kdelibs (EXISTS) Build Directory /home/mjansen/kde/trunk/bld/KDE/kdelibs (CONFIGURED) Prefix: /kde/trunk/kde Environment: CMAKE_PREFIX_PATH: /kde/trunk/support:/kde4/qt/4.6 KDEDIRS: /kde/trunk/support LD_LIBRARY_PATH: /kde/trunk/support/lib64 MAKEFLAGS: -j8 MANPATH: PATH: /kde/trunk/support/bin:/usr/X11R6/bin:/usr/bin:/bin PKG_CONFIG_PATH: /kde/trunk/support/lib64/pkgconfig PYTHONPATH: QTDIR: STRIGI_PLUGIN_PATH: /kde/trunk/support/lib64/strigi XDG_DATA_DIRS: /kde/trunk/support:/usr/share:/share VCS: git-svn Remote: git-svn -> svn://anonsvn.kde.org/home/kde/trunk/KDE Build System: cmake Out Of Source Build true CMAKE_BUILD_TYPE: Debug CMAKE_CXXFLAGS: -Wall -pipe -O0 CMAKE_VERBOSE_MAKEFILE: 1 LIB_SUFFIX: 64 #### Module KDE/kdelibs finished </pre>
If you want to change any of these settings you can do that in the files ~/.build-tool/kde.yaml or ~/.build-tool/kde/recipe. The information where that file is is available with the info command.
<pre>$ kde-build info Recipe ------ Name: kde Short: Build the kde 4.x development branch. Long: A recipe to build the kde4 development branch. The core modules and some additional extragear and playground modules are provided. Warning: This is the development branch for the next kde release. It is not necessarily stable! Full Path: /usr/lib64/ruby/gems/1.8/gems/build-tool-0.2/recipes/kde/recipe Configuration ------------- Settings: /home/mjansen/.build-tool/kde.yaml Overrides: /home/mjansen/.build-tool/kde/recipe </pre>
Have a look at the recipe specified after Full Pathabove to see how to write a recipe. I hope to get a tutorial up during the next week. After you tried changing some of the setting reissue the module infocommand to see if your change had the desired effect.
You now could start building kde. Just issue kde-build build kdesupport/. The kdesupport/ part specifies the modules to build as all modules that start with kdesupport/ in the order they are listed with the lsmods command.
Using Environments
Compiling stuff for the first time means problems. Missing dependencies or not found already installed dependencies are the usual trouble makers. To have a better shot at debugging those problems it is possible to open a shell with the exact environment the script uses to compile the module. There are two possibilities to do that kde-build module shell [module] or kde-build environment set [environment].
Features
The modules listed above are not the end of the recipe. They are just a sane starting point. If you want to enable more modules you have to look at features.
<pre>$ kde-build lsfeatures Feature | A | Description =========================================================== bindings | N | KDE Language Bindings devel | N | KDE Development Tools (SDK) devel/icecream | N | Icecream finance | N | KDE Finance Applications graphics | N | KDE Graphics Applications kdeqt | N | KDE Qt Repository kdevelop | N | KDevelop (IDE) kdevelop/plugins | N | KDevelop plugins l10n | N | KDE Localization multimedia | N | KDE Multimedia Applications network | N | KDE Network Applications office | N | KDE Office Suite plasma | N | KDE Plasma scripting/python | N | KDE Python scripting support support | Y | KDE Support Modules utils | N | KDE Utils webdev | N | KDE Web Development (Quanta + KDevelop Plugins) webkit | N | WebKit related modules</pre>
As you can see most of the features are disabled by default. If you want to know more about a feature do
<pre>$ kde-build lsfeature kdeqt Name : kdeqt Modules ==================================================== qt/qt : no description qt/qimageblitz : no description qt/qca2 : no description qt/qtscriptgenerator: no description qt/poppler : no description qt/qjson : no description</pre>
It is recommended to use a distro build qt for kde development. But i usually fail to do
that. So if you want a self compiled qt from the kdeqt gitorious clone enable the feature in
$HOME/.build-tool/kde/recipe. Search for the disable feature "kdeqt" line and comment it out.
If you don't need all the modules above you can disable them selectively with
disable module "qt/qjson".
Running a full kde session
If you successfully compiled at least kdesupport/ and KDE/ you
probably wonder how to run the stuff. There are some possibilities.
First there is a description "Launching KDE 4 Sessions" on techbase
Or you use the supplied tools
Method one
build-tool provides a custom xsession script. Together with your login manager you should be able to use a session type custom or something like which look for a ~/.xsession file in you $HOME directory.
<pre>$ kde-build files xsession finish_installation.sh kde4.desktop $ kde-build files xsession > ~/.xsession </pre>
Method two
Inform your system there is a new session type in town.
$ kde-build files xsession > $KDEDIR/bin/mystartkde $ chmod a+x $KDEDIR/bin/mystartkde $ kde-build files kde4.desktop > /usr/share/xsession/kde4trunk.desktop

Recent comments
26 weeks 2 days ago
27 weeks 5 days ago
27 weeks 5 days ago
27 weeks 5 days ago
27 weeks 5 days ago
27 weeks 6 days ago
27 weeks 6 days ago
28 weeks 5 hours ago
28 weeks 9 hours ago
28 weeks 11 hours ago