Creating Debian/Ubuntu .deb packages
In this post, I will show you how to create a .deb package from some binary files.
Step 1: Create the directories
Create a directory for your package. Also, create a directory DEBIAN.
Step 2: Copy files into your package
You can copy the files into your package with the full paths on the destination filesystem. E.g. if you want to put a file in /usr/local/bin/ you put it in helloworld/usr/local/bin/
Step 3: Create the control file
Create a file 'control' in the DEBIAN directory
These are the mandatory fields in the control file. For more options see http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-binarycontrolfiles
Step 4: Add a post-installation script
You can create a file 'postinst' in the DEBIAN directory. Make sure it is executable. It will run when the installation is complete.
Step 5: Create the package
This creates a helloworld.deb file, which you can now install on any Debian installation with following command:
Op zoek naar innovatieve manieren om te groeien?Neem contact op