Tested on ubuntu 12.04 amd64.
Added hack to make i386/amd64 packages depending on the architecture of the system.