Prep your system for building packages By default, Ubuntu does not come with the tools required. You need to install the package build-essential for making the package and checkinstall for putting it into your package manager. These can be found on the install CD or in the repositories, searching in Synaptic Package Manager or the command-line apt-get:
sudo apt-get install build-essential checkinstall
You should then build a common directory for yourself where you'll be building these packages. We recommend creating /usr/local/src, but really you can put it anywhere you want. Make sure this directory is writable by your primary user account, by running
sudo chown yourusername /usr/local/src
sudo chmod u+rwx /usr/local/src
After you've done this, you're set up to start getting the programs you need.
1.Download your file to the Desktop
2.Open a terminal and type the following:
cd Desktop/ [hit enter]
3.Take a look at what's in the folder by typing:
ls [hit enter]
Here you will see a list of everything on your desktop I should mention if you havent been using it when typing long file names hitting the tab key auto completes based on which folder you are currently in. So if your now type the begining of your file name and it tab it would auto complete it.
4.Type the following to move the downloaded tar.gz to a better location. I will be moving my file to the folder we created to place out unpacked tarballs /usr/local/src
sudo mv filename.tar.gz /usr/local/src [hit enter]
[enter your password] [hit enter]
5.Now that we have moved our target location its time to navigate to that folder and unpack. If you have a bz2 compressed folder use alternate command to unpack. Type the following:
cd /usr/local/src [hit enter]
sudo tar -xzvf filename.tar.gz [hit enter]
tar xjvf filename.tar.bz2
6.This will unpack the zip right next to the tar.gz so you better clean up by typing the following:
sudo rm filename.tar.gz [hit enter]
7.Time to go into this newly unpacked folder and compile.
cd foldername [hit enter]
By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. We are going to let it install to the default which is /usr/local/bin
8.To compile type the following:
sudo -s [hit enter]
./configure [hit enter]
make [hit enter]
make install [hit enter]
make clean [hit enter]
Now if this application you have installed is ment to be run in a terminal then you can run it by typing the exported file name in a terminal these apps will also have help installed to show you available commands for your new tool. If the app has a GUI then you should find an exicutible in the /usr/local/bin run it and your app will run.
Hope this helps in the process, it's really quick compaired to how this looks.
credit - http://jesse.im/