diff options
| author | Adam Vandenberg | 2012-02-25 11:35:03 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2012-02-25 11:37:15 -0800 |
| commit | bb5bead0b8cc797ac577a1a24bb52efa3680ea3b (patch) | |
| tree | cc5714266cf8f0a3df8708daa930f55516ff9fa0 | |
| parent | 0e82431bce72d138e0ac49b4ce0f7b4af4dfc26f (diff) | |
| download | homebrew-bb5bead0b8cc797ac577a1a24bb52efa3680ea3b.tar.bz2 | |
Riak 1.1.0
Also move to using pre-packaged downloads for Riak.
Rationale:
Riak does not always compile against the latest version of Erlang.
As we like to bump Erlang aggresively, this ends up breaking Riak.
Since the pre-packaged Riak comes with a specific verison of Erlang,
this gets around this problem. And there's no compelling reason to want
to compile Erlang-based software from scratch.
| -rw-r--r-- | Library/Formula/riak.rb | 60 |
1 files changed, 18 insertions, 42 deletions
diff --git a/Library/Formula/riak.rb b/Library/Formula/riak.rb index 8cb603e96..871b927fb 100644 --- a/Library/Formula/riak.rb +++ b/Library/Formula/riak.rb @@ -1,54 +1,30 @@ require 'formula' +require 'hardware' class Riak < Formula homepage 'http://wiki.basho.com/Riak.html' - url 'http://downloads.basho.com/riak/riak-1.0.3/riak-1.0.3.tar.gz' - md5 '433d2cb0c6eba0b6d374d9d37f7f54fe' - head 'https://github.com/basho/riak.git' - - skip_clean 'libexec/log' - skip_clean 'libexec/log/sasl' - skip_clean 'libexec/data' - skip_clean 'libexec/data/dets' - skip_clean 'libexec/data/ring' - - depends_on 'erlang' + if Hardware.is_64_bit? and not ARGV.build_32_bit? + url 'http://downloads.basho.com.s3-website-us-east-1.amazonaws.com/riak/1.1/1.1.0/riak-1.1.0-osx-x86_64.tar.gz' + version '1.1.0-x86_64' + sha256 '4f885a4952661500fd45ef114a1f89c88f8fd40870d4a421a6d7139eaa2966c0' + else + url 'http://downloads.basho.com.s3-website-us-east-1.amazonaws.com/riak/1.1/1.1.0/riak-1.1.0-osx-i386.tar.gz' + version '1.1.0-i386' + sha256 '757a179244a2f8bb811925626eda5df24f15dd0e0b16a4b1337913ecd6a382be' + end - # Enable use of Erlang R14B04; fixed in the upstream 1.1.0 pre-release. - def patches; DATA; end + skip_clean :all def install - ENV.deparallelize - system "make all rel" - %w(riak riak-admin search-cmd).each do |file| - inreplace "rel/riak/bin/#{file}", /^RUNNER_BASE_DIR=.+$/, "RUNNER_BASE_DIR=#{libexec}" - end + libexec.install Dir['*'] - # Install most files to private libexec, and link in the binaries. - libexec.install Dir["rel/riak/*"] - bin.install_symlink libexec+'bin/riak', - libexec+'bin/riak-admin', - libexec+'bin/search-cmd' - - (prefix + 'data/ring').mkpath - (prefix + 'data/dets').mkpath + # The scripts don't dereference symlinks correctly. + # Help them find stuff in libexec. - @adamv + inreplace Dir["#{libexec}/bin/*"] do |s| + s.change_make_var! "RUNNER_SCRIPT_DIR", "#{libexec}/bin" + end - # Install man pages - man1.install Dir["doc/man/man1/*"] + bin.install_symlink Dir["#{libexec}/bin/*"] end end - -__END__ -diff --git a/rebar.config b/rebar.config -index ee81bfc..31d2fae 100644 ---- a/rebar.config -+++ b/rebar.config -@@ -1,6 +1,6 @@ - {sub_dirs, ["rel"]}. - --{require_otp_vsn, "R14B0[23]"}. -+{require_otp_vsn, "R14B0[234]"}. - - {cover_enabled, true}. - |
