Build Quassel on Linux (english) » History » Version 16
Build Quassel on Linux¶
Step-by-step guide to compile the project utilizing the the classic toolchain in a terminal
- Table of contents
- Build Quassel on Linux
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):
# 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 https://github.com/quassel/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
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. Note: LINGUAS is an environment variable, not a cmake variable. You can optionally export it before running cmake.
$ cd ~/quassel/build $ LINGUAS="de en_US" 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
Now the command 'make' generates the calls for the compiler
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:
/home/user/quassel/build/# checkinstall -D --pkgname quassel-all --pkgversion 0.5.0 --pkgrelease $(date +%y%m%d%H%M%S) make install
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).]
Das Paket wird entsprechend dieser Vorgaben erstellt:
0 - Maintainer: [ firstname.lastname@example.org ]
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):
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 # quick quassel buildscript (draft) # # initialize your local git-repository once with this command # cd ~ && git clone https://github.com/quassel/quassel.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 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=OFF -DLINGUAS="de en_US" make # # 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