~phablet-team/messaging-framework/trunk

« back to all changes in this revision

Viewing changes to HACKING.md

  • Committer: Tarmac
  • Author(s): Roberto Mier Escandon
  • Date: 2016-11-19 01:31:11 UTC
  • mfrom: (70.1.14 dynamic-soname)
  • Revision ID: tarmac-20161119013111-7uky78nj17zy9jlw
Have dynamic soversion for the fw depending on the distro, to avoid ABI break problems with gcc or libboost different versions. (see https://wiki.ubuntu.com/Bileto?action=show&redirect=citrain%2FLandingProcess#Handling_Symbols)
Using messaging-framework word instead of messaging-fw in all the project.

Approved by system-apps-ci-bot, Gustavo Pichorim Boiko.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Messaging Framework
 
2
 
 
3
### Checking dependencies
 
4
 
 
5
Check all the dependencies needed for the project to be built:
 
6
```sh
 
7
$ dpkg-checkbuilddeps
 
8
```
 
9
(this will return the list of dependencies). Install the returned dependencies:
 
10
```sh
 
11
$ apt-get install <list_of_dependencies>
 
12
```
 
13
 
 
14
### Building the code
 
15
 
 
16
You can check the needed packages by using:
 
17
```sh   
 
18
$ dpkg-checkdependencies
 
19
```
 
20
 
 
21
and install the list of needed dependencies returned. Once done, execute:
 
22
```sh
 
23
$ mkdir build && cd build
 
24
$ cmake -DCMAKE_INSTALL_PREFIX=/usr ../..
 
25
$ make -j<n>
 
26
```
 
27
where <n> is the number of cores available to use for building.
 
28
You can use ccache also if expected to build several times (apt-get install ccache)
 
29
 
 
30
 
 
31
### Running the tests
 
32
 
 
33
Once built, into build folder, execute:
 
34
```sh
 
35
$ ctest -j<n>
 
36
```
 
37
where <n> is the number of cores available to use for executing the tests in parallel
 
38
 
 
39
 
 
40
### Building the package
 
41
 
 
42
NOTE: Before building the package it is needed run a hook which updates debian folder. You have to execute
 
43
that hook from project folder:
 
44
```sh
 
45
$ ./debian/bileto_pre_release_hook
 
46
```
 
47
 
 
48
If all goes well, no response should be returned.
 
49
 
 
50
You can build the deb package in current arch by executing:
 
51
```sh
 
52
$ dh_clean
 
53
$ dpkg-buildpackage -b
 
54
```
 
55
 
 
56
in case you want to skip signage and dependencies to build a test package, you can use some additional params:
 
57
```sh
 
58
$ dpkg-buildpackage -nc -us -uc -d -b
 
59
```
 
60
 
 
61
besides, if you are in a lxd container and want to build a package for that container architecture:
 
62
```sh
 
63
$ dpkg-buildpackage -nc -us -uc -d -b --target-arch <arch> -a <arch> -j<n>
 
64
```
 
65
 
 
66
where <arch> is the architecture of the environment and <n> the number of cores to use
 
67
 
 
68
Depending on the release the soname of the resultant library will be on or another. You can query file:
 
69
```sh
 
70
tools/get_soversion.sh
 
71
```
 
72
 
 
73
the soversion that will be used for the library. The resultant .deb package will be like:
 
74
```sh
 
75
libmessaging-framework<apiversion>-<soversion>_XXX_<arch>.deb
 
76
```
 
77