{{Header}}
== 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 dkms
}}
== Get the Signing Key ==
{{
Build_Documentation_Get_Signing_Key
|fullname={{{fullname}}}
|shortname={{{shortname}}}
|link={{{link}}}
|longfingerprint={{{longfingerprint}}}
|gpgfingerprintparam={{{gpgfingerprintparam}}}
}}
== 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}}}
}}
== OpenPGP Verify the Source Code ==
{{
Build_Documentation_OpenPGP_Verify_the_Source_Code
|version={{{version}}}
}}
== Choose Version ==
{{
Build_Documentation_Choose_Version
|version={{{version}}}
|extra=
}}
== Check Git ==
{{Build Documentation Check Git
|version={{{version}}}
}}
== Check Git ==
{{Build Documentation Check Git
|version={{{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.
lkrg lkrg_{{{version}}}-1_amd64.buildinfo lkrg_{{{version}}}-1_amd64.changes lkrg-dkms_{{{version}}}-1_amd64.deb
== Installation ==
{{CodeSelect|code=
sudo dpkg -i ../lkrg-dkms_{{{version}}}-1_amd64.deb
}}
== Clean Up ==
Clean up temporary files debhelper files in package source folder. Show files to remove.
{{CodeSelect|code=
git clean -ffdn
}}
Clean up temporary files debhelper files in package source folder. Actually remove.
{{CodeSelect|code=
git clean -ffd
}}
Remove .deb file etc. in parent folder.
TODO: document