Archive

Keeping Track

While many distributions have quite advanced package managers, there will come a point when compiling from source is a must. But, how then do you manage it so that you can keep track of where the [Mm]akefile has put all the compiled applications, etc?

Enter: http://www.gnu.org/software/stow/stow.html (stow). This program will keep track of all your compiled binaries by linking all binaries/libs/etc in /usr/local/.

For a more general overview, see /CompileFromSource as to why stow is considered useful.

To set up Stow, all you have to do is:

mkdir /usr/local/stow

Then when compiling a program do:

./configure –prefix=/usr/local/stow/name.version

(where “name.version” is something like: fvwm-2.5.7)

make && su -c’make install’

That will install the program in /usr/local/stow/name.version. Then what you have to do is:

cd /usr/local/stow && stow -v name.version

(where “name.version” is the same as above). The “-v” flag means the output is verbose and so you’ll see what it is doing.

When that is complete, I suggest you run:

ldconfig -X

(making sure that /usr/local/lib is in /etc/ld.so.conf), which will just keep the cache happy).

You will then, see a load of symlinks in “/usr/local/bin” if you do an “ls -l” which then point back to the original install location.

Assuming /usr/local/bin is in $PATH (which it ought to be), you can then launch the programs just fine.

To remove the “package”, you can do:

cd /usr/local/stow && stow -Dv name.version

(which removes the symlinks, but still leaves the binaries intact). To remove the binaries do:

rm -fr /usr/local/stow/name.version

Leave a Reply