2012-09-12 06:37:45 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Opam < Formula
|
|
|
|
homepage 'https://github.com/OCamlPro/opam'
|
2013-03-14 20:39:11 +00:00
|
|
|
url 'https://github.com/OCamlPro/opam/archive/1.0.0.tar.gz'
|
|
|
|
sha1 '5e126f71c7e0caff3b61a751ef09dd66892720ae'
|
2012-09-12 06:37:45 +00:00
|
|
|
|
2013-02-10 21:51:26 +00:00
|
|
|
head 'https://github.com/OCamlPro/opam.git'
|
|
|
|
|
2012-09-12 06:37:45 +00:00
|
|
|
depends_on "objective-caml"
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "./configure", "--prefix=#{prefix}"
|
|
|
|
system "make"
|
|
|
|
system "make install"
|
2013-02-02 01:05:46 +00:00
|
|
|
|
|
|
|
bash_completion.install "shell/opam_completion.sh"
|
|
|
|
zsh_completion.install "shell/opam_completion_zsh.sh"
|
2012-09-12 06:37:45 +00:00
|
|
|
end
|
|
|
|
|
2013-03-25 18:35:20 +00:00
|
|
|
test do
|
|
|
|
system "#{bin}/opam", "--help"
|
2012-09-12 06:37:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
2013-02-10 21:51:26 +00:00
|
|
|
OPAM uses ~/.opam by default for its package database, so you need to
|
|
|
|
initialize it first by running (as a normal user):
|
2012-09-12 06:37:45 +00:00
|
|
|
|
2012-10-03 17:14:18 +00:00
|
|
|
$ opam init
|
2012-09-12 06:37:45 +00:00
|
|
|
|
2013-03-12 22:52:17 +00:00
|
|
|
Run the following to initialize your environment variables:
|
2013-02-10 21:51:26 +00:00
|
|
|
|
|
|
|
$ eval `opam config env`
|
2012-09-12 06:37:45 +00:00
|
|
|
|
2013-02-10 21:51:26 +00:00
|
|
|
To export the needed variables every time, add them to your dotfiles.
|
|
|
|
* On Bash, add them to `~/.bash_profile`.
|
|
|
|
* On Zsh, add them to `~/.zprofile` instead.
|
2012-10-03 17:14:18 +00:00
|
|
|
|
2013-01-15 13:25:06 +00:00
|
|
|
Documentation and tutorials are available at http://opam.ocamlpro.com, or
|
|
|
|
via 'man opam' and 'opam --help'.
|
2012-09-12 06:37:45 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|