Can anyone help with a homebrew formula to install emacs' VM ("View Mail"), located:
http://www.nongnu.org/viewmail/
https://code.launchpad.net/vm
I can get as far as a script, that should look like this:
bzr get lp:vm
cd vm
./configure --with-emacs=~/.homebrew/bin/emacs --prefix=~/.homebrew
make
make install
This clearly depends on emacs & bzr. It should also be updated any time emacs is and any time "bzr get" returns a new version. I have looked at a few example formulae which include a url for wget and a sha1sum of the downloaded file, but since this script doesn't involve these, I'm having trouble knowing where to start.
Here's what I have looking at those example formulae, but as I say, I don't know what to do with the "url" and "sha1" methods:
require "formula"
class ViewMail < Formula
homepage "http://www.nongnu.org/viewmail/"
url "what do I do with this when download uses bzr get ...?"
sha1 "ditto"
depends_on :emacs
depends_on :bzr
def install
system "bzr", "get", "lp:vm"
system "cd", "vm"
system "./configure", "--with-emacs=#{prefix}/bin/emacs", "--prefix=#{prefix}"
system "make"
system "make", "install"
end
end
Best Answer
This works:
Though I'm not sure how to dynamically list the necessary prefix for the load-path in the caveats.