{{Header}}
{{title|title=
{{PAGENAME}}
}}
{{intro|
The build process for any of the {{ExtLink
|https://github.com/{{project_name_short}}
|text=packages by {{project_name_short}}
|icons=none
}} developers is very similar. This wiki page explains how to build the package {{{package}}}
. By replacing the package name {{Github_link
|repo={{{package}}}
|text={{{package}}}
}} with the name of any [[Packages for Debian Hosts|other]] package you are interested in building, that other package would be built. You have two options.
* '''A)''' Instructions on '''this''' page about '''how to build''' the {{{package}}}
'''package from source code''' while [[Verifying Software Signatures|verifying software signatures]] for better security. '''OR'''
* '''B)''' [[Dev/Build Documentation/{{{package}}}/easy|Easier instructions click here]].
}}
== Get Build Dependencies ==
[[update|Update]] your package lists.
{{CodeSelect|code=
sudo apt update
}}
Install from the 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 built using ]dpkg-buildpackage
the resulting packages will be created in the parent folder. It is better for usability if this is not the user's home folder since many other files may already reside there. This makes 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}}}
}}
== Get the Signing Key ==
{{Build_Documentation_Get_Signing_Key
|fullname={{{fullname}}}
|shortname={{{shortname}}}
|link={{{link}}}
|longfingerprint={{{longfingerprint}}}
|gpgfingerprintparam={{{gpgfingerprintparam}}}
}}
== Change Directory ==
Enter the package's source code folder because later on package build commands that use make
are expected to be run from the root of the source folder.
{{CodeSelect|code=
cd {{{package}}}
}}
== OpenPGP Verify the Source Code ==
{{
Build_Documentation_OpenPGP_Verify_the_Source_Code
|version={{{version}}}
}}
== Choose Version ==
{{
Build_Documentation_Choose_Version
|version={{{version}}}
|extra=
}}
== Build the Package ==
Install build dependencies.
{{CodeSelect|code=
sudo mk-build-deps --remove --install
}}
If that did not work, look at the debian/control
file and manually install all packages listed under Build-Depends
and Depends
.
Build the package without signing it (not required for personal use).
{{CodeSelect|code=
dpkg-buildpackage -b
}}
== Build Result ==
When a package is built using dpkg-buildpackage
the resulting packages will be created in the parent folder. That is, 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
== Install the Package ==
The package can be found in the parent folder.
{{CodeSelect|code=
sudo dpkg -i ../{{{package}}}*.deb
}}
== Clean Up ==
Delete temporary debhelper files in the package source folder as well as debhelper artifacts (.deb file etc.) in the parent folder.
1) Show extraneous temporary debhelper files.
{{CodeSelect|code=
git clean -ndff
}}
2) NOTE: Read the above output carefully if you added 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 the parent folder.
TODO: document
== Footnotes ==
{{reflist|close=1}}
[[Category:Development]]
{{Footer}}