I'm about to switch over to the Homebrew
package management system, and almost everything looks very simple. However,
I've been using this computer for a while, and so I already have a bunch of
/usr/local. I'm OK with deleting almost all of it, as there are
formulæ for almost everything in there. However, it's the "almost" that's
leading to my current confusion. There are some executables—including published
ones, small personal scripts, and even TextMate's
/usr/local/bin which aren't available through Homebrew. The Homebrew Tips
'N' Tricks page suggests
./configure --prefix=/usr/local/Cellar/foo/1.2 && make && make install &&
brew link foo, but this is only a useful suggestion if there's something I'd
like to actually build, rather than a simple binary or a symlink to something
My question, then, is how to deal with unmanaged software and Homebrew simultaneously. I see a few possible approaches:
- Mix the two freely. I can't tell if Homebrew will tolerate me dumping
unmanaged binaries and symlinks in
/usr/local/bin; my guess is that it will work for now, but just lead to problems down the road. However, I also see that Homebrew's supposed to be flexible with existing file hierarchies. I'd be curious to hear what the official line on this is. Nevertheless, it's not clear that it's an attractive approach.
- (Ab?)Use the official system. Create empty
/usr/local/Cellar/foo/1.0directories, copy the binaries/symlinks in there, and then
brew link foo. This will make symlinks be twice-indirected, but that doesn't seem like a real problem. This seems like the best approach to me, but not having used Homebrew, I'm not sure about the drawbacks. Is this going to cause long-term problems when, for instance, upgrading formulæ, or when new overlapping formulæ are created?
- Just don't mix the two. There are two approaches here:
- Put my personal binaries/symlinks in another directory. I'm not sure
what the best location is (
~/usr/bin? Something else?), but it solves the mixing problem by punting on it.
- Put Homebrew in another directory (e.g.,
/usr/homebrew/). This solves the problem in the same way as 3.1. The disadvantage is that I'm putting Homebrew somewhere nonstandard, which seems like it'll just cause a series of tiny minor headaches in the long run.
- Put my personal binaries/symlinks in another directory. I'm not sure what the best location is (
- Something else that I don't know about or haven't thought of.
What's the best way to do this? Is there an official one? Are there obvious flaws or benefits to any of these approaches that I haven't thought about?