User Tools

Site Tools


mdx_debian_package

How to create a debian package for manitou-mdx

We start from a fresh source tree for manitou-mdx, as obtained by un-tarring a manitou-mdx-<version>.tar.gz source archive. We'll use 0.9.11 as an example. The commands we need to create the package are available through the dpkg-dev (or fakeroot) and dh-make packages.

The steps are:

1) Create Makefile and build

$ cd manitou-mdx-0.9.11
$ perl Makefile.PL INSTALLDIRS=vendor
$ make

2) dh_make

dh_make -s --native -c GPL --email some-email@domain.tld

3) Replace the contents of debian/control

by this file: control.txt (rename it to control) or copy-paste the contents below:

Source: manitou-mdx
Section: email
Priority: optional
Maintainer: Daniel Verite <email@domain.tld>
Build-Depends: libdbd-pg-perl (>= 1.32), libmailtools-perl (>= 1.62), libmime-perl (>= 5.417), libbit-vector-perl (>= 6.4), libdigest-sha1-perl (>= 2.11), perl

Package: manitou-mdx
Architecture: all
Priority: optional
Depends: libdbd-pg-perl (>= 1.32), libmailtools-perl (>= 1.62), libmime-perl (>= 5.417), libbit-vector-perl (>= 6.4), libdigest-sha1-perl (>= 2.11), perl
Description: mail-database exchanger script for the manitou-mail software
 Manitou is a database-driven mail user-agent and associated utilities. It provides a framework and tools for storing and exposing mail as organized data, accessible by SQL. It is aimed at handling seamlessly large mailboxes, possibly processed by multiple concurrent users.  In addition to the features commonly found in traditional mail programs, its user interface comes with some more unique, database oriented ways to organize, retrieve and process mail messages.

4) edit debian/rules

In the clean target, comment the line that reads: -$(MAKE) clean This is necessary because our make clean removes the Makefile, which is something that dpkg-buildpackage doesn't expect to happen.

5) Run dpkg-buildpackage -rfakeroot

$ dpkg-buildpackage -rfakeroot 

After that step, the binary package file named manitou-mdx_0_9_11_all.deb should be present in the directory immediately above the source directory. It should be installable by root:

# dpkg -i manitou-mdx_0_9_11_all.deb
mdx_debian_package.txt · Last modified: 2011/07/18 12:32 by daniel