Updatedd on 3/10/23
You can create Debian Packages with:
dpkg-buildpackage, which requires the "dpkg-dev" package.
sudo apt install dpkg-dev
or with
debuild, which requires the "devscrips" package.
sudo apt install devscripts
You will also need a helper package "debmake", which produces the required changelog, control, and rules files and other templates such as copyright.
sudo apt install debmake
Yuo will also need dch to edit the changelog file. It included with the devscripts package.
dpkg-buildpackage -rfakeroot -b -uc -us
or debuild with the following options:
build -b -uc -us
By default Debian has enabled "hardening" to help programmer write better code and catch potential run time errors. However, if you are just trying to compile someone else's source code, such as a repository on GetHub, this causes big problems.