These are instructions for building a ‘testing’ package on a ‘stable’ system.

When running the stable distribution of debian occasionally you
want to install non-stable packages, because they don’t appear in
stable, or features or revisions are not up to what we need on our
system. To do this we have to simply compile the upstream packages in
the traditional debian style.

We have on our system the pre-requisite packages to build .deb files,
namely: dpkg-dev and fakeroot. Our /etc/apt/sources.list file contains
the following “deb-src” lines which are duplicates of normal “deb”
lines, with deb-src in front instead:

  deb-src http://non-us.debian.org/debian-non-US testing/non-US main contrib non-free
  deb-src http://non-us.debian.org/debian-non-US testing/non-US main contrib non-free

note: it is possible to add lines similar to this for unstable, but it
would be better to add them when you are sure you want package source from
unstable instead of accidentally getting something from unstable.

The process to install a package from something other than stable is: