Code-review pull of code to build deb and rpm packages.

Also few improvements in general build Makefile.