Writing this for myself and others since most documentation online, official or otherwise, tend to make it look way more complicated than it really is.
- Install the required packages:
$ sudo apt install build-essential devscripts dh-make lintian - Fetch the source code:
$ wget https://example.com/path/to/pkgname/vx.y.z.tar.gz - Unpack the source code:
$ tar xvf /path/to/your/vx.y.z.tar.gz - Make sure the unpacked source code is in all lowercase
- Change directory to the unpacked source code:
$ cd /path/to/your/pkgname-x.y.z - Run this:
$ dh_make --native. Choosesfor arch-specific stuff,ifor arch-independent stuff (such as Node.js programs) - This creates a
debian/subdirectory in the source code. Delete all files except the following indebian/(if the other files are required, we can add them back later):