2012-09-12 06:37:45 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Opam < Formula
|
|
|
|
homepage 'https://github.com/OCamlPro/opam'
|
2013-01-15 13:25:06 +00:00
|
|
|
url 'https://github.com/OCamlPro/opam/archive/0.9.1.tar.gz'
|
|
|
|
sha1 '49622e3677ed4514b1c4a4eb59beccc2f0c4960c'
|
2012-09-12 06:37:45 +00:00
|
|
|
|
|
|
|
depends_on "objective-caml"
|
|
|
|
|
|
|
|
def install
|
|
|
|
system "./configure", "--prefix=#{prefix}"
|
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def test
|
|
|
|
system "#{bin}/opam --help"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
2012-10-03 17:14:18 +00:00
|
|
|
OPAM uses ~/.opam by default to install packages, so you need to initialize
|
|
|
|
the package database 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
|
|
|
|
2012-10-03 17:14:18 +00:00
|
|
|
and add the following line to ~/.profile to initialize the environment:
|
2012-09-12 06:37:45 +00:00
|
|
|
|
2012-10-03 17:14:18 +00:00
|
|
|
$ eval `opam config -env`
|
|
|
|
|
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
|