I state that this is not intended as a comprehensive tutorial, but only a sort of manabile - but I will remember the manabili? - Especially useful for those who want to try to rebuild itself from a Debian package and not have the time to deepen the theory.

First you must install the core packages for this type of operation:

# apt-get install devscripts build-essential

Then go download the source package that we want to recompile:

# apt-get source nome_pacchetto

Caution: The package is downloaded in the current directory!

The name of the package you can easily obtain the output of dpkg greppando:

# dpkg -l | grep -i openoffice

In the example we have searched to find the correct name of the package openoffice.org.

Now we proceed to the generation of dependencies:

# apt-get build-dep nome_pacchetto

Straight! In debian there are some scripts and configuration files that may require specific changes, perhaps even those for which it was decided to rebuild the package. Among these are the most important rules (compiler options) and changelog (the name should be self-explanatory).

To recompile the package:

# cd nome_pacchetto
# debuild -us -uc

Once terminatala compilation, you will find the packages. Deb in the directory, ready for installation:

# cd ..
# dpkg -i *.deb

For clarity we see a concrete example:

# apt-get source mysql-server-5.0
# apt-get build-dep mysql-server-5.0
# cd mysql-dfsg-5.0-5.0.32
# debuild -us -uc
# cd ..
# dpkg -i *.deb

Have a lot of fun!

Share this content:
  • del.icio.us
  • Google Bookmarks
  • Digg
  • Facebook
  • Technorati
  • MySpace
  • Twitter