Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn't include with OS X.
Packages are installed into their own isolated prefixes and then symlinked into /usr/local.
$ cd /usr/local
$ find Cellar
$ ls -l bin
bin/wget -> ../Cellar/wget/1.12/bin/wget
Just extract the tarball and straight away you have a working Homebrew installation.
Install Homebrew Today!
Create new Homebrew packages in seconds.
$ brew create http://foo.com/bar-1.0.tgz
Easily adapt Homebrew formula to your needs. And since it's all Git underneath your changes are merged automatically with upstream updates.