wiki:Internal/DPKG

Version 1 (modified by jsingh, 13 years ago) ( diff )

We create debian packages for Orbit and Wimax. These are some steps you can follow to create your own debian package.
Make a folder for your application

mkdir app

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

Source: applicationA
Package: applicationA
Section: omf
Priority: optional
Maintainer: Ivan Seskar <seskar@winlab.rutgers.edu>
Build-Depends: debhelper (>= 7)
Standards-Version: 3.7.2
Version: 1.0
Architecture: all
Depends: daemon, snmpd,ruby
Description: Demon for controlling base functionality.

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
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

/etc
/usr/bin

Following this dirs file you will create two folders under the app folder

cd app 
mkdir etc
mkdir usr
mkdir usr/bin

You will copy your intended files in these folders so they can be installed in the target machine.

cp app.xml ./etc/
cp app ./usr/bin/

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. Now lets create our package, go one folder up from the app directory

dpkg-deb --build app

This will produce for you app.deb file if all goes well.

Note: See TracWiki for help on using the wiki.