Build dovecot 2.0.1 debian packages

I really like the apt system, i often use it for my personal binary packages distribution between my systems and it’s great to install test systems in few minutes.

In august dovecot 2.0.1 was released, i’d have liked to test the new software on my lenny servers, but i could not find any .deb binary package online.. so i build it by myself.

To start, download the essential packages:

aptitude install build-essential make devscripts dh-make

Download dovecot 2.0.1:


and unpack it.

Now enter the dovecot directory and type:

dh_make -s -e -n

Edit ./debian/control and make your changes (description, etc)

Edit ./debian/rules at line 34 and set CFLAGS and LDFLAGS like this:

./configure $(CROSS) –prefix=/usr –mandir=\$${prefix}/share/man –infodir=\$${prefix}/share/info CFLAGS=”$(CFLAGS)” LDFLAGS=”$(LDFLAGS)”

We are ready to build the package:

debuild binary

If all goes well you will have “../dovecot_2.0.1_i386.deb”, install it with “dpkg -i”.

Let’s add your configure options within rules file, for example “–with-mysql”:

./configure $(CROSS) –prefix=/usr –mandir=\$${prefix}/share/man –infodir=\$${prefix}/share/info –with-mysql CFLAGS=”$(CFLAGS)” LDFLAGS=”$(LDFLAGS)”

For more informations about debian packaging refer to Debian New Maintainers’ Guide


Leave a Reply

Your e-mail address will not be published. Required fields are marked *