Build Quassel on Linux (english) » History » Version 14
johu, 09/09/2010 02:00 AM
update git reference to gitorious
1 | 1 | musca | h1. Build Quassel on Linux |
---|---|---|---|
2 | 1 | musca | |
3 | 1 | musca | Step-by-step guide to compile the project utilizing the the classic toolchain in a terminal |
4 | 1 | musca | |
5 | 1 | musca | {{toc}} |
6 | 1 | musca | |
7 | 1 | musca | h2. Preparation of the build system |
8 | 1 | musca | |
9 | 1 | musca | The build process needs |
10 | 1 | musca | - the compiler and some tools like a linker, cmake, make |
11 | 1 | musca | - the development libraries for KDE4, QT4, OpenSSL and zlib |
12 | 1 | musca | - and git to manage the Quassel sourcecode |
13 | 1 | musca | |
14 | 13 | musca | Under DEBIAN GnU/Linux Squeeze/Sid the needed packages are installed as follows (execute as root): |
15 | 13 | musca | <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> |
16 | 13 | musca | |
17 | 12 | musca | (please insert commands for other distributions here) |
18 | 13 | musca | |
19 | 1 | musca | |
20 | 1 | musca | h2. Managing the sourcecode |
21 | 1 | musca | |
22 | 1 | musca | This task is done utilizing "git":http://en.wikipedia.org/wiki/Git_(software) while being logged in as a normal user. |
23 | 1 | musca | The sourcecode is downloaded with 'git clone $URL' and stored in the directory ~/quassel. |
24 | 14 | johu | <pre><code>$ cd ~ && git clone git://gitorious.org/quassel/quassel.git</code></pre> |
25 | 1 | musca | |
26 | 1 | musca | The development of Quassel is an ongoing process, so from time to time you want |
27 | 1 | musca | to update to the latest contributions with 'git pull origin' . |
28 | 1 | musca | |
29 | 7 | musca | <pre><code>$ cd ~/quassel && git pull origin</code></pre> |
30 | 1 | musca | |
31 | 1 | musca | |
32 | 2 | musca | h2. Compile! |
33 | 1 | musca | |
34 | 1 | musca | After updating the sourcecode one can generate a new build. |
35 | 1 | musca | Every build is done in its own directory enabling |
36 | 1 | musca | the return to the old build directory in the case of defeat. |
37 | 10 | musca | <pre><code>$ cd quassel |
38 | 1 | musca | $ mkdir build |
39 | 8 | musca | </code></pre> |
40 | 1 | musca | |
41 | 1 | musca | In the build directory the command 'cmake' generates the make-files (i.e. a dependency map for the compiler). |
42 | 8 | musca | The options of cmake are described in the file ~/quassel/INSTALL in your source directory . |
43 | 10 | musca | <pre><code>$ cd ~/quassel/build |
44 | 1 | musca | $ 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" |
45 | 8 | musca | </code></pre> |
46 | 1 | musca | |
47 | 1 | musca | Now the command 'make' generates the calls for the compiler |
48 | 8 | musca | <pre><code>$ make </code></pre> |
49 | 1 | musca | |
50 | 1 | musca | h2. Install with checkinstall |
51 | 1 | musca | |
52 | 1 | musca | It is wise to prefer the default packagemanager of your system rather doing a 'make install'. |
53 | 1 | musca | The installation will be done as root with checkinstall. |
54 | 1 | musca | checkinstall generates a package (deb, rpm or tgz) for your packagemanager (apt, rpm or installpkg), |
55 | 1 | musca | that can later be removed easily and leaves a clean system. |
56 | 1 | musca | checkinstall has options for several distributions: -D for Debian, -R for RPM, -S for Slackware. |
57 | 1 | musca | When installing the package it asks interactive two questions, as shown in the following example: |
58 | 1 | musca | |
59 | 1 | musca | example: |
60 | 8 | musca | <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> |
61 | 1 | musca | Output: |
62 | 1 | musca | Please enter a description of the package. |
63 | 1 | musca | Finish your description with an empty line or EOF. |
64 | 1 | musca | |
65 | 1 | musca | Input: |
66 | 1 | musca | >> [quassel-all contains quassel-core, quassel-client and quassel (mono).] |
67 | 1 | musca | >> [enter] |
68 | 1 | musca | |
69 | 1 | musca | Output: |
70 | 1 | musca | Das Paket wird entsprechend dieser Vorgaben erstellt: |
71 | 10 | musca | 0 - Maintainer: [ your.name@somedomain.test ] |
72 | 1 | musca | 1 - Summary: [ quassel-all contains core, client und quassel (mono). ] |
73 | 1 | musca | 2 - Name: [ quassel-all ] |
74 | 1 | musca | 3 - Version: [ 0.5.0 ] |
75 | 1 | musca | 4 - Release: [ 091021181559 ] |
76 | 1 | musca | 5 - License: [ GPL ] |
77 | 1 | musca | 6 - Group: [ checkinstall ] |
78 | 1 | musca | 7 - Architecture: [ i386 ] |
79 | 1 | musca | 8 - Source location: [ build_091021181559 ] |
80 | 1 | musca | 9 - Alternate source location: [ ] |
81 | 1 | musca | 10 - Requires: [ ] |
82 | 1 | musca | 11 - Provides: [ quassel-all ] |
83 | 1 | musca | |
84 | 1 | musca | Input: |
85 | 1 | musca | [ just press [enter] to proceed generating the package] |
86 | 1 | musca | |
87 | 5 | musca | The result: Quassel is installed. (here for Debian): |
88 | 11 | musca | <pre><code> Done. The new package has been installed and saved to |
89 | 1 | musca | |
90 | 1 | musca | /home/$(user)/quassel/build/quassel-all_0.5.0-091021103522_i386.deb |
91 | 1 | musca | |
92 | 1 | musca | You can remove it from your system anytime using: |
93 | 1 | musca | |
94 | 1 | musca | dpkg -r quassel-all |
95 | 5 | musca | </code></pre> |
96 | 1 | musca | |
97 | 3 | musca | |
98 | 1 | musca | |
99 | 1 | musca | h2. Draft of a buildscript |
100 | 1 | musca | |
101 | 2 | musca | The repeating tasks of updating and compiling is done in the following buildscript: |
102 | 9 | musca | <pre><code>#!/usr/bin/bash |
103 | 1 | musca | # quick quassel buildscript (draft) |
104 | 1 | musca | # |
105 | 1 | musca | # initialize your local git-repository once with this command |
106 | 14 | johu | # cd ~ && git clone git://gitorious.org/quassel/quassel.git ~/quassel |
107 | 1 | musca | # |
108 | 1 | musca | # updating latest contributions: |
109 | 1 | musca | cd ~/quassel |
110 | 1 | musca | git pull origin |
111 | 1 | musca | # |
112 | 1 | musca | # make a new build directory with a suffix containing the date |
113 | 1 | musca | export date=$(date +%y%m%d%H%M%S) |
114 | 1 | musca | mkdir build_$date |
115 | 1 | musca | # |
116 | 1 | musca | # cmake: Optionen siehe ~/quassel/INSTALL |
117 | 1 | musca | cd build_$date |
118 | 11 | musca | 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" |
119 | 1 | musca | make |
120 | 1 | musca | # |
121 | 1 | musca | # avoid the classic 'make install', prefer generating a package with checkinstall |
122 | 1 | musca | echo please execute as root via copy & paste in the directory ~/quassel/build_$date |
123 | 1 | musca | echo first to remove old package: dpkg -r quassel-all |
124 | 1 | musca | echo then to install new package: checkinstall -D --pkgname quassel-all --pkgversion 0.5.0 --pkgrelease $date make install |
125 | 4 | musca | </code></pre> |