Hello random person from the Interweb!
I've started to use GNU Stow to install application from source and decided to post about it. Paraphrasing from the description on its home-page, Stow permits to install distinct applications from sources in the same place using a tangle of symbolic links, so the big software package that want to be installed to /usr/local
acts as it's the only one installed.
The gist of it consists to configure the application to be installed under a common path called the Stow dir1, compiling/installing it as usual and finally invoking Stow to create the required links to add binaries, libraries and eventual man pages to the corresponding paths.
To "remove" a previously installed application Stow should be invoked with the -D
option followed by the application directory. This will only remove the symbolic links, the application directory is still available with all the binaries, to revert the operation.
$ stow generic-application-2.0
$ stow -D generic-application-2.0
For ease of use, I've added the Stow and target paths to my ~/.stowrc file:
--dir=/usr/local/stow
--target=/usr/local
in this way I can "install" and "remove" applications without cd-ing to the Stow directory before invoking it.
The above covers basically the 90% of it's usage, at least for my use case. For details like for example, resolving conflicts or the chstow
target dir maintenance tool, the documentation is the usual resource.
I should spend some time pondering if it would be better to stuck stuff in my home dir instead of /usr/local/
, for starter my home partition is usually the biggest one and being the only user on my systems I don't have advantages in storing applications under /usr/local
.
in my case I've decided to use /usr/local/stow
, how original... ↩︎