Create a directory to store the debian folder
$ mkdir -p test_folder/DEBIAN
Create a control
file inside debian folder
$ nano test_folder/DEBIAN/control
# Add the following information to the file
Package: Test-Python
Version: 1.0
Section: custom
Priority: optional
Architecture: all
Essential: no
Installed-Size: 1024
Maintainer: [email protected]
Description: Creates a debian package out of a simple python file
Create a directory tree which represents the path where our program will be installed in the system, and copy the executable into it
$ mkdir -p test_folder/opt/random/folder
$ cp test.py test
Then run the command
dpkg-deb --build test_folder
You may need to set up
export DEBEMAIL="[email protected]"
export DEBFULLNAME="Firstname Lastname"
Use the important command to build the debian package after setting up the package folders
$ dpkg-buildpackage -b -uc -us