author+date
[www.git] / www / psensor / build_debian_pkg.html
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
6 <meta name="viewport" content="width=device-width, initial-scale=1.0">
7 <meta name="generator" content="Asciidoctor 1.5.4">
8 <title>How to build the Debian package of psensor from GIT</title>
9 <link rel="stylesheet" href="./../style.css">
10 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.5.0/css/font-awesome.min.css">
11 <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
12 <script src="nav.js"></script>
13 <script src="https://apis.google.com/js/platform.js" async defer>
14 </script>
15 </head>
16 <body class="article">
17 <div id="header">
18 <h1>How to build the Debian package of <code>psensor</code> from GIT</h1>
19 </div>
20 <div id="content">
21 <div id="preamble">
22 <div class="sectionbody">
23 <div class="paragraph">
24 <p>This document is explaining step by step how to build the Debian
25 package of psensor directly from the GIT repository.</p>
26 </div>
27 </div>
28 </div>
29 <div class="sect1">
30 <h2 id="_build_the_debian_package">Build the Debian package</h2>
31 <div class="sectionbody">
32 <div class="paragraph">
33 <p>Install <code>git-buildpackage</code>:</p>
34 </div>
35 <div class="listingblock">
36 <div class="content">
37 <pre>sudo apt-get install git-buildpackage</pre>
38 </div>
39 </div>
40 <div class="paragraph">
41 <p>Install all build dependencies (you can get it from
42 the variable <code>Build-depends</code> of the file <code>debian/control</code>):</p>
43 </div>
44 <div class="listingblock">
45 <div class="content">
46 <pre>sudo apt-get install ...</pre>
47 </div>
48 </div>
49 <div class="paragraph">
50 <p>Checkout the source of <code>psensor</code> and its packaging:</p>
51 </div>
52 <div class="listingblock">
53 <div class="content">
54 <pre>git clone https://git.wpitchoune.net/psensor-pkg-debian.git</pre>
55 </div>
56 </div>
57 <div class="paragraph">
58 <p>Build the Debian package:</p>
59 </div>
60 <div class="listingblock">
61 <div class="content">
62 <pre>cd psensor-pkg-debian.git
63 git-buildpackage</pre>
64 </div>
65 </div>
66 </div>
67 </div>
68 <div class="sect1">
69 <h2 id="_build_to_another_debian_distribution">Build to another Debian distribution</h2>
70 <div class="sectionbody">
71 <div class="paragraph">
72 <p><code>pbuilder</code> can be used to build <code>psensor</code> to another Debian
73 distribution than the one used by the build machine.</p>
74 </div>
75 <div class="paragraph">
76 <p>Installation of <code>pbuilder</code>:</p>
77 </div>
78 <div class="listingblock">
79 <div class="content">
80 <pre>apt-get install pbuilder qemu-user-static</pre>
81 </div>
82 </div>
83 <div class="paragraph">
84 <p>Create the distribution image:</p>
85 </div>
86 <div class="listingblock">
87 <div class="content">
88 <pre>git-pbuilder create --config raspbian.pbuilderrc</pre>
89 </div>
90 </div>
91 <div class="paragraph">
92 <p>The variable <code>DISTRIBUTION</code> in the configuration file is specifying
93 the distribution target of the build. It might be useful for
94 example to check the compilation on the 'testing' flavor of <code>Debian</code>.</p>
95 </div>
96 <div class="paragraph">
97 <p>See a configuration example for <code>Raspbian</code>:
98 <a href="raspbian.pbuilderrc">raspbian</a>.</p>
99 </div>
100 <div class="paragraph">
101 <p>To update the image:</p>
102 </div>
103 <div class="listingblock">
104 <div class="content">
105 <pre>git-pbuilder update</pre>
106 </div>
107 </div>
108 <div class="paragraph">
109 <p>Checkout the source of <code>psensor</code> and its packaging:</p>
110 </div>
111 <div class="listingblock">
112 <div class="content">
113 <pre>git clone https://git.wpitchoune.net/psensor-pkg-debian.git</pre>
114 </div>
115 </div>
116 <div class="paragraph">
117 <p>And finally, build the <code>Debian</code> package:</p>
118 </div>
119 <div class="listingblock">
120 <div class="content">
121 <pre>git-buildpackage --git-pbuilder</pre>
122 </div>
123 </div>
124 </div>
125 </div>
126 <div class="sect1">
127 <h2 id="_references">References</h2>
128 <div class="sectionbody">
129 <div class="ulist">
130 <ul>
131 <li>
132 <p><a href="https://wiki.debian.org/git-pbuilder" class="bare">https://wiki.debian.org/git-pbuilder</a></p>
133 </li>
134 <li>
135 <p><a href="https://www.debian.org/doc/manuals/maint-guide/build.en.html" class="bare">https://www.debian.org/doc/manuals/maint-guide/build.en.html</a></p>
136 </li>
137 </ul>
138 </div>
139 </div>
140 </div>
141 </div>
142 <div id="footer">
143 <div id="footer-text">
144 Last updated 2017-01-29 00:41:01 CET
145 </div>
146 </div>
147 </body>
148 </html>