1. You will meet problem with installing sun-java6-jdk and you can add the following lines into /etc/apt/sources.list
deb http://mirrors.sohu.com/ubuntu/ hardy multiverse
deb http://mirrors.sohu.com/ubuntu/ hardy main multiverse
deb http://mirrors.sohu.com/ubuntu/ hardy main multiverse
2. sudo apt-get update
3. Then you could issue command as follows to install required tools:
sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl sun-java6-jdk zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev
4. Make bash the default shell.
sudo dpkg-reconfigure dash (and answer no)