6.13 How do I install a source package?
Debian source packages can't actually be "installed", they are just
unpacked in whatever directory you want to build the binary packages they
Source packages are distributed on most of the same mirrors where you can
obtain the binary packages. If you set up your APT's
sources.list(5) to include the appropriate "deb-src"
lines, you'll be able to easily download any source packages by running
apt-get source foo
To help you in actually building the source package, Debian source package
provide the so-called build-dependencies mechanism. This means that the source
package maintainer keeps a list of other packages that are required to build
their package. To see how this is useful, run
apt-get build-dep foo
before building the source.