Template:Build Documentation Build Package Easy
Get Build Dependencies
Update your package lists.
sudo apt-get update
Install from Debian repository.
sudo apt-get install build-essential devscripts git
Change Directory to Build Folder
This chapter is recommended for better usability, but is not strictly required. [1]
Create folder ~/{{{package}}}-build
.
mkdir -p ~/{{{package}}}-build
Change directory to folder ~/{{{package}}}-build
.
cd ~/{{{package}}}-build
Get the Source Code
Get the the package's source code.
git clone https://github.com/Kicksecure/{{{package}}}.git
Remember it is Kicksecure, not kicksecure! If you are prompted for a username for github, it means you have mistyped the web address.
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.
cd {{{package}}}
Choose Version
git checkout {{{version}}}
Build the Package
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.
ls ../
Should show something like this.
lkrg lkrg_{{{version}}}-1_amd64.buildinfo lkrg_{{{version}}}-1_amd64.changes lkrg-dkms_{{{version}}}-1_amd64.deb
Installation
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.
git clean -ffdn
Clean up temporary files debhelper files in package source folder. Actually remove.
git clean -ffd
Remove .deb file etc. in parent folder.
TODO: document
- ↑
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: dpkg-buildpackage: support output directory other than ..