Is there a way to build rpm's and deb's on the same system

Have a look at https://github.com/jordansissel/fpm .


See the Open Build Service


Ideally you should be building packages in a chroot environment, using something like pbuilder for debs and mock for RPMs. Mock can be run on Ubuntu so you can do everything on a single build machine. Chroot build environments ensure that packages are built cleanly and aren't affected by any weirdness in the host machine. They also use the correct dependencies when building for different OS versions.