I maintain a number of elisp packages (e.g. codesearch, emacs-ycmd, traad) that would benefit from being able to install the external programs that they use, saving time and effort for some users. For example, with codesearch.el it would be nice to be able to download, compile, and install the codesearch tools (written in go, not elisp) for users. This would remove at least one barrier for using the package.
Are there any "best practices" for doing this? For example, where should I put the external programs?
If if you don't have any direct advice, can you refer me to any packages that do something like this (and, ideally, that do it well)?