This is for Debian Wheezy so all of the instructions should work for Ubuntu 12.04 just change the repos. If Ubuntu has a repo that's the equivalent of Debian Wheezy's backport repo use that repo (the roundcube version in regular wheezy is 0.72, backports is the newer 0.95)