{{Header}}
The build process of building any of the {{Archive_link
|url=https://github.com/{{project_name_short}}
|text=packages by {{project_name_short}}
|archive=none
}} developers is always very similar. This very wiki page explain how to build package {{{package}}}
. By replacing the name of the package {{Archive_link
|url=https://github.com/{{project_name_short}}/{{{package}}}
|text={{{package}}}
|archive=none
}} with the name of any [[Packages for Debian Hosts|other]] package you might be interested in building, the other package would be build. You have two options.
* '''A)''' Instructions on '''this''' page about '''how to build''' the {{Archive_link
|url=https://github.com/{{project_name_short}}/{{{package}}}
|text={{{package}}}
|archive=none
}} package from source code '''without''' [[Verifying Software Signatures|verifying software signatures]] for simplicity.
'''OR'''
* '''B)''' [[Dev/Build Documentation/{{{package}}}|Instructions with verifying software signatures click here]].
== Get Build Dependencies ==
[[Security_Guide#Updates|Update]] your package lists.
{{CodeSelect|code=
sudo apt update
}}
Install from Debian repository.
{{CodeSelect|code=
sudo apt install build-essential devscripts git
}}
== Change Directory to Build Folder ==
This chapter is recommended for better usability, but is not strictly required. [
When a package is build using ]dpkg-buildpackage
the resulting packages will be created in the parent folder. It's better for usability if this is not the user's home folder since many other files may already reside there. Thereby making the build result files more difficult to find or delete. This is a missing Debian feature. See: [https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657401 dpkg-buildpackage: support output directory other than ..]
Create folder ~/{{{package}}}-build
.
{{CodeSelect|code=
mkdir -p ~/{{{package}}}-build
}}
Change directory to folder ~/{{{package}}}-build
.
{{CodeSelect|code=
cd ~/{{{package}}}-build
}}
== Get the Source Code ==
{{
Build_Documentation_Get_SourceCode
|package={{{package}}}
}}
== Change Directory to Source Code Folder ==
Get into the package's source code folder because later on package build commands are expected to be run from the root of the source folder.
{{CodeSelect|code=
cd {{{package}}}
}}
== Choose Version ==
This is optional in case you want to build from master branch.
Do not use version 0.1
but a sensible version number.
{{CodeSelect|code=
git checkout {{{version}}}
}}
== Build the Package ==
{{CodeSelect|code=
dpkg-buildpackage -b
}}
== Build Result ==
When a package is build using dpkg-buildpackage
the resulting packages will be created in the parent folder. I.e. in this case in the ~/{{{package}}}-build
folder.
{{CodeSelect|code=
ls ../
}}
Should show something like this.
{{{package}}} {{{package}}}{{{version}}}-1_amd64.buildinfo {{{package}}}{{{version}}}-1_amd64.changes
== Installation ==
{{CodeSelect|code=
sudo dpkg -i ../{{{package}}}_{{{version}}}-1_amd64.deb
}}
== Clean Up ==
Delete temporary files debhelper files in package source folder as well as debhelper artifacts (.deb file etc.) in parent folder.
1) Show extraneous (temporary files debhelper) files.
{{CodeSelect|code=
git clean -ndff
}}
2) NOTE: Read above output carefully if you added files of your own files to that folder.
If that looks good, actually remove.
{{CodeSelect|code=
git clean -dff
}}
3) Delete debhelper artifacts (.deb file etc.) in parent folder.
TODO: document
== Footnotes ==
{{reflist|close=1}}
[[Category:Development]]
{{Footer}}