X-Git-Url: https://git.wpitchoune.net/gitweb/?p=www.git;a=blobdiff_plain;f=src%2Fpsensor%2Fbuild_debian_pkg.adoc;fp=src%2Fpsensor%2Fbuild_debian_pkg.adoc;h=795b059da62c7459232a4c3b1dd12f18f49f5aee;hp=0000000000000000000000000000000000000000;hb=30d3073487892c62872bfc407c18cedb2247b875;hpb=6fff7902fa472ba93dda3c69455ce74b35d04fda diff --git a/src/psensor/build_debian_pkg.adoc b/src/psensor/build_debian_pkg.adoc new file mode 100644 index 0000000..795b059 --- /dev/null +++ b/src/psensor/build_debian_pkg.adoc @@ -0,0 +1,81 @@ += How to build the Debian package of `psensor` from GIT +:docinfo2: +:icons: font + +This document is explaining step by step how to build the Debian +package of psensor directly from the GIT repository. + +== Build the Debian package + +Install `git-buildpackage`: + +---- +sudo apt-get install git-buildpackage +---- + +Install all build dependencies (you can get it from +the variable `Build-depends` of the file `debian/control`): + +---- +sudo apt-get install ... +---- + +Checkout the source of `psensor` and its packaging: + +---- +git clone https://git.wpitchoune.net/psensor-pkg-debian.git +---- + +Build the Debian package: + +---- +cd psensor-pkg-debian.git +git-buildpackage +---- + +== Build to another Debian distribution + +`pbuilder` can be used to build `psensor` to another Debian +distribution than the one used by the build machine. + +Installation of `pbuilder`: + +---- +apt-get install pbuilder qemu-user-static +---- + +Create the distribution image: + +---- +git-pbuilder create --config raspbian.pbuilderrc +---- + +The variable `DISTRIBUTION` in the configuration file is specifying +the distribution target of the build. It might be useful for +example to check the compilation on the 'testing' flavor of `Debian`. + +See a configuration example for `Raspbian`: +link:raspbian.pbuilderrc[raspbian]. + +To update the image: + +---- +git-pbuilder update +---- + +Checkout the source of `psensor` and its packaging: + +---- +git clone https://git.wpitchoune.net/psensor-pkg-debian.git +---- + +And finally, build the `Debian` package: + +---- +git-buildpackage --git-pbuilder +---- + +== References + +* https://wiki.debian.org/git-pbuilder +* https://www.debian.org/doc/manuals/maint-guide/build.en.html \ No newline at end of file