Below is a .sh script for fixing packages on Ubuntu.
This is the bash script I used to fix the package for Zimbra when installing on Ubuntu 12.x
use:
$ ./fixpkg.sh foldernameAbovePackageDir
#!/bin/bash
P=$1
for PKG in `ls -1 $P/packages/*deb`
do
echo "Fixing $PKG"
rm -rf fixZ
mkdir fixZ
cd fixZ
mkdir tmp
dpkg-deb -x ../$PKG tmp
dpkg-deb -e ../$PKG
sed -i -e "s/_/./g" DEBIAN/control
mv ../$PKG ../$PKG.old
dpkg-deb --build . ../$PKG
cd ..
done