I want to create a DEB file manually. I would like to just provide a folder which contains data to install, and a script to be executed after installation.
Is this possible?
|
I want to create a DEB file manually. I would like to just provide a folder which contains data to install, and a script to be executed after installation. Is this possible? |
|||||||||||
|
Making a source packageMy recommendation is to make a source package. Install build-essential, debhelper, dh-make. Change to the directory where the files you want to install are (the directory name must be of the form
Making a binary packageIf you decide to make a binary package, which is not really easier because there aren't as many tools to facilitate the process, you'll need some basic familiarity with the format of deb packages. It is described in the Debian Policy Manual, in particular ch. 3 (format of binary packages), ch. 5 (control files), ch. 6 (installation scripts) and appendix B (binary package manipulation). You make sure that your package installs the expected files On Debian and derivativesIf you have the Debian tools available, use
The hard wayIf you don't have the Debian tools, build an archive of the files you want to package called
You need at least a control file with the fields The script to be executed after installation is called Converting a binary package from a different formatIf you already have a binary package from another distribution, you can use alien to convert it. |
|||||||||||
|
|
See the Debian Wiki on Packaging, maybe Wikipedia's page on the |
|||
|
|
|
I do a lot of packages, and to do a full one is not a trivial matter. On a positive note, files and scripts are much less work. You can create such a package, very simply, with a tool known as debreate. Debreate is a really simple GUI, for just creating simple DEB packages. You can just specify which files, where they go, and if/what should execute on post/pre install/uninstall. I used to just do all my packages the standard way, but after I started using this tool, I will only go back when necessary. |
|||
|
|
|
First off you need to create a build folder and an archive of your files: Then in the build folder you must create a control file with some wanted informations:
Then you can add independently preinst, postint, prerm and postrm shell scripts to control pre and post install and pre and post remove behaviour of the .deb file and then you can create the control archive with tar: Then you need a debian-binary file: Finally you need |
||||
|
|
|
||||
|
|