| 1 | We create debian packages for Orbit and Wimax. These are some steps you can follow to create your own debian package.[[BR]] |
| 2 | Make a folder for your application[[BR]] |
| 3 | {{{ mkdir app }}} [[BR]] |
| 4 | Inside the folder please create a DEBIAN folder. The most import folder inside the DEBIAN folder is the control file which details all the information about the particular application. Please see the example control file below |
| 5 | {{{ |
| 6 | Source: applicationA |
| 7 | Package: applicationA |
| 8 | Section: omf |
| 9 | Priority: optional |
| 10 | Maintainer: Ivan Seskar <seskar@winlab.rutgers.edu> |
| 11 | Build-Depends: debhelper (>= 7) |
| 12 | Standards-Version: 3.7.2 |
| 13 | Version: 1.0 |
| 14 | Architecture: all |
| 15 | Depends: daemon, snmpd,ruby |
| 16 | Description: Demon for controlling base functionality. |
| 17 | |
| 18 | }}} |
| 19 | This file tells you that its name is ApplicationA , which has optional priority , is under the omf section. It is maintained by Ivan Seskar, needs the following packages 'daemon,snmpd and ruby' installed before it can be installed. Its current release version is 1.0 [[BR]] |
| 20 | Another file needed here is called the 'dirs' which lists all the directories you will be adding your files to on the target system, lets look at an example file |
| 21 | {{{ |
| 22 | /etc |
| 23 | /usr/bin |
| 24 | }}} |
| 25 | Following this dirs file you will create two folders under the app folder |
| 26 | {{{ |
| 27 | cd app |
| 28 | mkdir etc |
| 29 | mkdir usr |
| 30 | mkdir usr/bin |
| 31 | }}} |
| 32 | You will copy your intended files in these folders so they can be installed in the target machine. |
| 33 | {{{ |
| 34 | cp app.xml ./etc/ |
| 35 | cp app ./usr/bin/ |
| 36 | }}} |
| 37 | If you need to execute any commands even before the dependencies are added you can add your statements to a 'preinst' file and the dpkg will execute those commands. On the other hand if you need to execute some commands after the installation has been completed, you can put those commands in the 'postinst' file. |
| 38 | Now lets create our package, go one folder up from the app directory |
| 39 | {{{ |
| 40 | dpkg-deb --build app |
| 41 | }}} |
| 42 | This will produce for you app.deb file if all goes well. |