This guide describes how to build a Debian package for a GENESIS component. It uses installer scripts included with the DeveloperPackage.
Before you can build a Debian package you need to have the following packages installed on the machine.
If you are using the Ubuntu operating system, all three are available from apt-get and Synaptic Package Manager.
To build a Debian package you need the following files specific to the package you are building:
A detailed explanation of each file follows.
The control file is a series of fields which correspond to information about the package you are building.
Example taken from the DeveloperPackage:
Maintainer: Hugo Cornelis [email@example.com]
Build-Depends: python2.5(>=2.5),libc6(>=2.3.6),libgcc1 (>=4.1.1)
Depends: python2.5(>=2.5),libc6(>=2.3.6),libgcc1 (>=4.1.1)
Description: The Neurospaces developer package contains essential tools for Neurospaces development.
This is a file with make instructions that are called when dpkg-buildpackage is invoked. It contains a rule for each source in the package.
The rules file used in the GENESIS packages is based on an example from Joey Hess from the Debian forums.
This is a log of the changes made to the package by the maintainer. This file has a particular format that must be followed, otherwise the package build will fail, halting the packaging process.
Example from the DeveloperPackage.
Developer (alpha.1) dapper; urgency=low
* First release packaged for ubuntu
-- Hugo Cornelis <firstname.lastname@example.org> Sat, 8 Aug 2009 14:45:16 +0000
The date in particular must follow the shown format of:
Day of the week, Day Month Year Time
as shown in the above example.
File contains copyright info. All components of the GENESIS project are licensed under GPL.
The package identifier must be identical in the following locations:
Otherwise the build will fail. A log of a Debian build can be found in build_debian.log file in the top level directory.
Once you have your .deb file in the top level source directory there are a couple ways you can go about verifying its contents.
If you wish to view the package contents via a gui interface, there is deb-gview which is available via apt-get and the synaptic package manager. Opening the resulting package in deb-gview you get a nice listing of all the files in the package as well as the package information:
You can also verify package contents via the command line using lintian, which is also available via apt-get and synaptic package manager. In addition to verifying the package contents, lintian will point out errors in the package build data.