You might want to look at
stow, which makes it easier to uninstall later.
For example, if you want to keep stuff under ~/pkgs, you'd compile with --prefix=~/pkgs, then override this when you make install with 'make --prefix=~/pkgs/stow install'. Then 'cd ~/pkgs/stow' and 'stow <pkgname>'. This create links for the app in ~/pkgs/bin, ~/pkgs/lib, etc. (Obviously, you'd add those directories to $PATH and $LD_LIBRARY_PATH, respectively). The advantage of this is that you can uninstall the package later with 'cd ~/pkgs/stow; stow -D <pkgname>'.
Of course, you could write a wrapper script to automate all of this, e.g .
stow-install:
Quote:
#!/bin/sh
[[ -n "$1" ]] && ./configure --prefix=~/pkgs && make && make --prefix=~/pkgs/stow/"$1" && cd ~/pkgs/stow && stow "$1"
|
You might want to extend this to allow further configuration options etc.
stow-uninstall:
Quote:
#!/bin/sh
[[ -n "$1" ]] && cd ~/pkgs/stow/"$1" && stow -D "$1"
|