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>
16 <body class="article">
18 <h1>How to build the Debian package of <code>psensor</code> from GIT</h1>
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>
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>
35 <div class="listingblock">
37 <pre>sudo apt-get install git-buildpackage</pre>
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>
44 <div class="listingblock">
46 <pre>sudo apt-get install ...</pre>
49 <div class="paragraph">
50 <p>Checkout the source of <code>psensor</code> and its packaging:</p>
52 <div class="listingblock">
54 <pre>git clone https://git.wpitchoune.net/psensor-pkg-debian.git</pre>
57 <div class="paragraph">
58 <p>Build the Debian package:</p>
60 <div class="listingblock">
62 <pre>cd psensor-pkg-debian.git
63 git-buildpackage</pre>
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>
75 <div class="paragraph">
76 <p>Installation of <code>pbuilder</code>:</p>
78 <div class="listingblock">
80 <pre>apt-get install pbuilder qemu-user-static</pre>
83 <div class="paragraph">
84 <p>Create the distribution image:</p>
86 <div class="listingblock">
88 <pre>git-pbuilder create --config raspbian.pbuilderrc</pre>
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>
96 <div class="paragraph">
97 <p>See a configuration example for <code>Raspbian</code>:
98 <a href="raspbian.pbuilderrc">raspbian</a>.</p>
100 <div class="paragraph">
101 <p>To update the image:</p>
103 <div class="listingblock">
104 <div class="content">
105 <pre>git-pbuilder update</pre>
108 <div class="paragraph">
109 <p>Checkout the source of <code>psensor</code> and its packaging:</p>
111 <div class="listingblock">
112 <div class="content">
113 <pre>git clone https://git.wpitchoune.net/psensor-pkg-debian.git</pre>
116 <div class="paragraph">
117 <p>And finally, build the <code>Debian</code> package:</p>
119 <div class="listingblock">
120 <div class="content">
121 <pre>git-buildpackage --git-pbuilder</pre>
127 <h2 id="_references">References</h2>
128 <div class="sectionbody">
132 <p><a href="https://wiki.debian.org/git-pbuilder" class="bare">https://wiki.debian.org/git-pbuilder</a></p>
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>
143 <div id="footer-text">
144 Last updated 2017-01-29 00:41:01 CET