2010-01-12 21:50:19 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Riak <Formula
|
|
|
|
depends_on 'erlang'
|
|
|
|
|
2010-03-11 11:30:44 +00:00
|
|
|
url 'http://downloads.basho.com/riak/riak-0.9/riak-0.9.1.tar.gz'
|
2010-01-12 21:50:19 +00:00
|
|
|
homepage 'http://riak.basho.com'
|
2010-03-11 11:30:44 +00:00
|
|
|
md5 '1f78bb838ae6ded568486b0b56655613'
|
2010-01-12 21:50:19 +00:00
|
|
|
|
|
|
|
skip_clean 'log'
|
|
|
|
skip_clean 'log/sasl'
|
|
|
|
skip_clean 'data'
|
|
|
|
skip_clean 'data/dets'
|
|
|
|
skip_clean 'data/ring'
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV.deparallelize
|
|
|
|
system "make all rel"
|
|
|
|
%w(riak riak-admin).each do |file|
|
|
|
|
inreplace "rel/riak/bin/#{file}", /^RUNNER_SCRIPT_DIR.+$/, ""
|
|
|
|
inreplace "rel/riak/bin/#{file}", /^RUNNER_BASE_DIR=.+$/, "RUNNER_BASE_DIR=#{prefix}"
|
|
|
|
end
|
|
|
|
system "mv rel/riak/* #{prefix}"
|
|
|
|
(prefix + 'data/ring').mkpath
|
|
|
|
(prefix + 'data/dets').mkpath
|
|
|
|
end
|
2010-03-11 11:30:44 +00:00
|
|
|
end
|