Found an error.
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-11-x86.x86_64.run
chmod +x amd-driver-installer-12-4-x86.x86_64.run
sh ./amd-driver-installer-12-4-x86.x86_64.run --buildpkg Ubuntu/precise
sudo dpkg -i fglrx*.deb
First line fetches 11.11,
next two lines refer to 12.4.
For 11.11 it should be
wget http://www2.ati.com/drivers/linux/ati-driver-installer-11-11-x86.x86_64.run
chmod +x amd-driver-installer-11-11-x86.x86_64.run
sh ./amd-driver-installer-11-11-x86.x86_64.run --buildpkg Ubuntu/precise
sudo dpkg -i fglrx*.deb
Fro 12.4 (7xxx series cards)
wget http://www2.ati.com/drivers/linux/ati-driver-installer-12-4-x86.x86_64.run
chmod +x amd-driver-installer-12-4-x86.x86_64.run
sh ./amd-driver-installer-12-4-x86.x86_64.run --buildpkg Ubuntu/precise
sudo dpkg -i fglrx*.deb