Installing from source code
  
Here we are going to install GAIM chat program from its source code. Enough talk, get to work :D.First download its source code from: http://gaim.sourceforge.net/
Open Konsole and in first shell position your self to folder where you have downloaded gaim and untar gaim tar file with command that we learned in previous lesson: tar -xf filename.tar.gz
dir so you can see what is inside download folder, and you will se gaim folder (it will not be called gaim but gaim-1.5.0)
cd position yourself in it and dir to see what is in there...
Type ./configure and shell will list something and do some checking.
At the end you will see what packages will and be and will not be installed.
We'll take example of tcl package. We will find and download it, then install it and then implement it with installation of gaim. This is just for an example but you will use this a lot, special for configuring apache+php+mysql.

type: ./configure --help
and you will get list of commands that can be written in extension of ./configure command.
REMEMBER: every command has --help extension which helps you using that command.
With that way we'll list to see our possibilities. Find where it says something about tcl. It is something like this: --with-tclconfig=DIR

Find and download, and untar, and position yourself to tcl folder.
Tcl can be found at: http://www.linuxfromscratch.org/blfs/view/stable/general/tcl.html
Install it with next way (you have it also on link that is above):
copy/paste in shell this:
export VERSION=8.4.11 &&
export V=`echo $VERSION | cut -d "." -f 1,2` &&
export DIR=$PWD &&
cd unix &&
./configure --prefix=/usr --enable-threads &&
make &&
sed -i "s:${DIR}/unix:/usr/lib:" tclConfig.sh &&
sed -i "s:${DIR}:/usr/include/tcl${V}:" tclConfig.sh &&
sed -i "s,^TCL_LIB_FILE='libtcl${V}..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\"," tclConfig.sh
Then login as root (su):
and copy/paste this in shell:
make install &&
install -v -d /usr/include/tcl${V}/unix &&
install -v -m644 *.h /usr/include/tcl${V}/unix/ &&
install -v -d /usr/include/tcl${V}/generic &&
install -v -c -m644 ../generic/*.h /usr/include/tcl${V}/generic/ &&
rm -v -f /usr/include/tcl${V}/generic/{tcl,tclDecls,tclPlatDecls}.h &&
ln -v -nsf ../../include/tcl${V} /usr/lib/tcl${V}/include &&
ln -v -sf libtcl${V}.so /usr/lib/libtcl.so &&
ln -v -sf tclsh${V} /usr/bin/tclsh
then do the same with this:
unset VERSION &&
unset V &&
unset DIR

Tcl libraries will be installed in: /usr/lib
We will check it are they there, and yes they are:

Now we are going to add parametar: --with-tclconfig=/usr/lib in ./configure command

and here you can see that Tcl is supported.
To install program I also recomend you to use parametar: --prefix=/usr/local/gaim because that is location where shell will install gaim.

so whole ./configurate command would look like this: ./configure --prefix=/usr/local/gaim --with-tclconfig=/usr/lib
To install it login as root (su), and type: make && make install
make does compiling
make install does installing
You can also use combination and type:
./configure --prefix=/usr/local/gaim --with-tclconfig=/usr/lib && make && make install
To run gaim, position yourself to its folder, and type: ./gaim
Usualy, programs are run by this way through shell: ./NameOfProgram
Post a Comment