Build Quassel on Linux (english) » History » Version 16

Version 15 (Anonymous, 07/29/2013 10:17 PM) → Version 16/17 (sandsmark, 06/13/2015 09:43 PM)

h1. Build Quassel on Linux

Step-by-step guide to compile the project utilizing the the classic toolchain in a terminal


h2. Preparation of the build system

The build process needs
- the compiler and some tools like a linker, cmake, make
- the development libraries for KDE4, QT4, OpenSSL and zlib
- and git to manage the Quassel sourcecode

Under DEBIAN GnU/Linux Squeeze/Sid the needed packages are installed as follows (execute as root):
<pre><code># apt-get update && apt-get install build-essential git-core cmake qt4-dev-tools libqt4-dev libqt4-sql-psql zlib1g-dev kdelibs4-dev libphonon-dev kdevelop-dev checkinstall </code></pre>

(please insert commands for other distributions here)

h2. Managing the sourcecode

This task is done utilizing "git": while being logged in as a normal user.
The sourcecode is downloaded with 'git clone $URL' and stored in the directory ~/quassel.
<pre><code>$ cd ~ && git clone</code></pre> git://</code></pre>

The development of Quassel is an ongoing process, so from time to time you want
to update to the latest contributions with 'git pull origin' .

<pre><code>$ cd ~/quassel && git pull origin</code></pre>

h2. Compile!

After updating the sourcecode one can generate a new build.
Every build is done in its own directory enabling
the return to the old build directory in the case of defeat.
<pre><code>$ cd quassel
$ mkdir build

In the build directory the command 'cmake' generates the make-files (i.e. a dependency map for the compiler).
The options of cmake are described in the file ~/quassel/INSTALL in your source directory. Note: LINGUAS is an environment variable, not a cmake variable. You can optionally export it before running cmake.
<pre><code>$ cd ~/quassel/build

Now the command 'make' generates the calls for the compiler
<pre><code>$ make </code></pre>

h2. Install with checkinstall

It is wise to prefer the default packagemanager of your system rather doing a 'make install'.
The installation will be done as root with checkinstall.
checkinstall generates a package (deb, rpm or tgz) for your packagemanager (apt, rpm or installpkg),
that can later be removed easily and leaves a clean system.
checkinstall has options for several distributions: -D for Debian, -R for RPM, -S for Slackware.
When installing the package it asks interactive two questions, as shown in the following example:

<pre><code>/home/user/quassel/build/# checkinstall -D --pkgname quassel-all --pkgversion 0.5.0 --pkgrelease $(date +%y%m%d%H%M%S) make install</code></pre>
Please enter a description of the package.
Finish your description with an empty line or EOF.

>> [quassel-all contains quassel-core, quassel-client and quassel (mono).]
>> [enter]

Das Paket wird entsprechend dieser Vorgaben erstellt:
0 - Maintainer: [ ]
1 - Summary: [ quassel-all contains core, client und quassel (mono). ]
2 - Name: [ quassel-all ]
3 - Version: [ 0.5.0 ]
4 - Release: [ 091021181559 ]
5 - License: [ GPL ]
6 - Group: [ checkinstall ]
7 - Architecture: [ i386 ]
8 - Source location: [ build_091021181559 ]
9 - Alternate source location: [ ]
10 - Requires: [ ]
11 - Provides: [ quassel-all ]

[ just press [enter] to proceed generating the package]

The result: Quassel is installed. (here for Debian):
<pre><code> Done. The new package has been installed and saved to


You can remove it from your system anytime using:

dpkg -r quassel-all

h2. Draft of a buildscript

The repeating tasks of updating and compiling is done in the following buildscript:
# quick quassel buildscript (draft)
# initialize your local git-repository once with this command
# cd ~ && git clone git:// ~/quassel
# updating latest contributions:
cd ~/quassel
git pull origin
# make a new build directory with a suffix containing the date
export date=$(date +%y%m%d%H%M%S)
mkdir build_$date
# cmake: Optionen siehe ~/quassel/INSTALL
cd build_$date
# avoid the classic 'make install', prefer generating a package with checkinstall
echo please execute as root via copy & paste in the directory ~/quassel/build_$date
echo first to remove old package: dpkg -r quassel-all
echo then to install new package: checkinstall -D --pkgname quassel-all --pkgversion 0.5.0 --pkgrelease $date make install