Fix debian package building mechanism

What do you think about this? I know we can do it better, but it actually seems to work and is very simple :)

This comit makes it possible to build debian packages using
dpkg-buildpackage. This fix is a kind of workaround -- it makes
it possible to compile and install the sources using the same
commands as when using autotools, but actually uses cmake build
system. It is still experimental, ie. not tested very well.