915476dd5d6a1914c28878e9655e84a5e50336e5
[www.git] / src / psensor / build_debian_pkg.adoc
1 = How to build the Debian package of `psensor` from GIT
2 :docinfo2:
3 :icons: font
4
5 This document is explaining step by step how to build the Debian
6 package of psensor directly from the GIT repository.
7
8 == Build the Debian package
9
10 Install `git-buildpackage`:
11
12 ----
13 sudo apt-get install git-buildpackage
14 ----
15
16 Install all build dependencies (you can get it from
17 the variable `Build-depends` of the file `debian/control`):
18
19 ----
20 sudo apt-get install ...
21 ----
22
23 Checkout the source of `psensor` and its packaging:
24
25 ----
26 git clone https://gitlab.com/jeanfi/psensor-pkg-debian.git
27 ----
28
29 Build the Debian package:
30
31 ----
32 cd psensor-pkg-debian.git
33 git-buildpackage
34 ----
35
36 == Build to another Debian distribution
37
38 `pbuilder` can be used to build `psensor` to another Debian
39 distribution than the one used by the build machine.
40
41 Installation of `pbuilder`:
42
43 ----
44 apt-get install pbuilder qemu-user-static
45 ----
46
47 Create the distribution image:
48
49 ----
50 git-pbuilder create --config raspbian.pbuilderrc
51 ----
52
53 The variable `DISTRIBUTION` in the configuration file is specifying
54 the distribution target of the build. It might be useful for
55 example to check the compilation on the 'testing' flavor of `Debian`.
56
57 See a configuration example for `Raspbian`:
58 link:raspbian.pbuilderrc[raspbian].
59
60 To update the image:
61
62 ----
63 git-pbuilder update
64 ----
65
66 Checkout the source of `psensor` and its packaging:
67
68 ----
69 git clone https://gitlab.com/jeanfi/psensor-pkg-debian.git
70 ----
71
72 And finally, build the `Debian` package:
73
74 ----
75 git-buildpackage --git-pbuilder
76 ----
77
78 == References
79
80 * https://wiki.debian.org/git-pbuilder
81 * https://www.debian.org/doc/manuals/maint-guide/build.en.html