星期一, 九月 08, 2008

Compiling Software

1: How to compile
Software that comes in source form is often made available as a tarball-that is, it is archived into a single large file and then compressed with tar and gzip or bzip2, which often end in .tar.gz or .tar.bz2 or .tgz(contraction of .tar and .gz)

tar -xvzf kdirstat-2.2.0.tgz
tar -xvjf kdirstat-2.2.0.tar.bz2

To get a quick list of all the directories in a source tree
ls -l | grep drwx

To see what configure options come with a package
./configure --help

./configure

make (echo $PATH)

make install


the KDirStat executable is installed by default in /usr/local/kde/bin



2:How to run
<1>Running with Path Information
/usr/local/kde/bin/kdirstat

<2>Adding the Executable Directory to the Path
To make change during the current login session
export PATH = $PATH:/usr/local/kde/bin

To make the path change persist
~/.bash_profile

To make the path alteration system-wide
/etc/profile

<3>Linking to the Executable
ln -s /usr/local/kde/bin/kdirstat /usr/local/bin



3:Cleaning Up
make clean
OR
rm -rf kdirstat-2.2.0