I'm working on apache2 source codes which is `apt-get source' from the Ubuntu repository.

The apt-get decompressed the apache2-xxx.tar.gz and merged with apache2-xxx-ubuntu.diff. So I deem the directory apache2-xxx/ contains the Ubuntu-ized apache2 source.

But after configure and make install, I found the built result directory structure is different to what it is I have installed by `apt-get install apache2'.

For example, `apt-get install apache2' splits the module-specific configs from the httpd.conf to mods-available/*, and all modules are compiled in shared objects. But the default configure (./configure with no option) compiles all modules into a single executable. Though I can specify --enable-mods-shared=all to ./configure, but then the compile failed.

The question is not only to the option --enable-mods-shared, I want to know how to compile apache2 or generally, an Ubuntu source package for distribute. What's the configure options should I give to build a more common Ubuntu-like binaries?


You can use make -f ./debian/rules, and the bash-completion on that, to build piecemeal. Or use debuild to make it all at once. You'll see the compilation rules, configure options, and customisations in the debian/ directory.


Do you know checkinstall? Can it do the trick?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.