These are the steps:
- make sure the source's root directory is named name-n.x.y where n, x, y are whole numbers.
- cd inside the source's root directory
- run dh_make as follows:
Code: Select all
dh_make --createorig
- dh_make interactively asks you some questions about the nature of the package, answer them.
- Now cd to the newly created debian subdirectory. You need to create a new file with the name package.install where package does NOT include the version number. The format for package.install is simply:
Code: Select all
file /path/to/file
- If you need a launcher create it and save it under the source's root directory. In the package.install file list it as follows:
This format works for a launcher (I used it in netman):
Code: Select all
launchername /usr/share/applications
Note: Keep the semicolons and consult other .desktop files.Code: Select all
[Desktop Entry] Categories=Application;Speficy a categor; Exec=executablename Comment= GenericName=executablename Icon=icon-if-any.ico Name=My Little Cool App Terminal=true/false Type=Application Categories=Speficy a category;
So, if we want to place our executable file under /usr/bin we would write:Code: Select all
programname /usr/bin
- Check whether there is already a Makefile under the source's root directory. If present you probably need no more changes. However, make sure the compiled executable name is the same name you used in the previous step.
- Create an orig source tarball as Debian mandates that . While in the source's root directory issue this command:
Code: Select all
tar -czvf ../package_versionnumber.orig.tar.gz --exclude debian/ .
- Once you did these steps correctly you can now build the new package as follows:
Code: Select all
dpkg-buildpackage
Enjoy.
EDIT: Replaced w with y in step 1.