Project

General

Profile

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

« Previous - Version 3/20 (diff) - Next » - Current version
musca, 10/22/2009 10:20 AM


Build Quassel on Linux

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

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 Sqeeze/Sid the needed packages are installed as follows (execute as root):
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

(please insert commands for other distributions here)

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.

$ cd ~ && git clone git://git.quassel-irc.org/quassel.git

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' .

$ cd ~/quassel && git pull origin

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.
$ 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 .
$ cd ~/quassel/build
$ cmake ~/quassel -DWANT_CORE=ON -DWANT_QTCLIENT=ON -DWANT_MONO=ON -DWITH_KDE=ON -DWITH_OPENSSL=ON -DWITH_DBUS=ON -DWITH_PHONON=ON -DWITH_WEBKIT=ON -DLINGUAS="de en_US"

Now the command 'make' generates the calls for the compiler
$ make

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:

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

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

Output:
Das Paket wird entsprechend dieser Vorgaben erstellt:
0 - Maintainer: [ root@aquarium ]
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 ]

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

The result (here for Debian):
Done. The new package has been installed and saved to
/home/$(user)/quassel/build/quassel-all_0.5.0-091021103522_i386.deb
You can remove it from your system anytime using:
dpkg -r quassel-all

Draft of a buildscript

The repeating tasks of updating and compiling is done in the following buildscript:

#!/usr/bin/bash
  1. quick quassel buildscript (draft) #
  2. initialize your local git-repository once with this command
  3. cd ~ && git clone git://git.quassel-irc.org/quassel.git ~/quassel #
  4. updating latest contributions:
    cd ~/quassel
    git pull origin #
  5. make a new build directory with a suffix containing the date
    export date=$(date +%y%m%d%H%M%S)
    mkdir build_$date #
  6. cmake: Optionen siehe ~/quassel/INSTALL
    cd build_$date
    cmake ~/quassel -DWANT_QTCLIENT=ON -DWITH_KDE=ON -DWITH_OPENSSL=ON -DWITH_DBUS=ON -DWITH_PHONON=ON -DWITH_WEBKIT=OFF -DLINGUAS="de en_US"
    make #
  7. 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