How to use Homebrew to install local archive
If Homebrew already has a formula for it (in /usr/local/Library/Formula), and you have the exact archive that the formula expects (i.e. same file name and same contents, as determined by SHA1 or whatever hash type the formula uses), you can put the archive in ~/Library/Caches/Homebrew and then try brew install formula_name (substituting the correct name for formula_name, of course).