2010-01-12 21:50:19 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Riak < Formula
|
2011-11-18 05:49:30 +00:00
|
|
|
url 'http://downloads.basho.com/riak/CURRENT/riak-1.0.2.tar.gz'
|
2011-10-21 03:41:52 +00:00
|
|
|
homepage 'http://wiki.basho.com/Riak.html'
|
2011-11-18 05:49:30 +00:00
|
|
|
md5 '322a1c66374f83a50519401e0386b15b'
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2011-05-27 17:55:58 +00:00
|
|
|
head 'https://github.com/basho/riak.git'
|
|
|
|
|
2010-04-26 17:39:57 +00:00
|
|
|
skip_clean 'libexec/log'
|
|
|
|
skip_clean 'libexec/log/sasl'
|
|
|
|
skip_clean 'libexec/data'
|
|
|
|
skip_clean 'libexec/data/dets'
|
|
|
|
skip_clean 'libexec/data/ring'
|
2010-04-07 05:58:35 +00:00
|
|
|
|
|
|
|
depends_on 'erlang'
|
2010-10-12 15:43:12 +00:00
|
|
|
|
2011-10-24 19:35:52 +00:00
|
|
|
# Enable use of Erlang R14B04
|
|
|
|
# This was fixed upstream, so when updating the version of Riak
|
|
|
|
# check if this fix is already in place.
|
|
|
|
def patches; DATA; end
|
|
|
|
|
2010-01-12 21:50:19 +00:00
|
|
|
def install
|
|
|
|
ENV.deparallelize
|
|
|
|
system "make all rel"
|
2011-11-12 21:08:14 +00:00
|
|
|
%w(riak riak-admin search-cmd).each do |file|
|
2010-04-26 17:39:57 +00:00
|
|
|
inreplace "rel/riak/bin/#{file}", /^RUNNER_BASE_DIR=.+$/, "RUNNER_BASE_DIR=#{libexec}"
|
2010-01-12 21:50:19 +00:00
|
|
|
end
|
2010-04-26 17:39:57 +00:00
|
|
|
|
|
|
|
# Install most files to private libexec, and link in the binaries.
|
|
|
|
libexec.install Dir["rel/riak/*"]
|
|
|
|
bin.mkpath
|
|
|
|
ln_s libexec+'bin/riak', bin
|
|
|
|
ln_s libexec+'bin/riak-admin', bin
|
2011-11-12 21:08:14 +00:00
|
|
|
ln_s libexec+'bin/search-cmd', bin
|
2010-04-26 17:39:57 +00:00
|
|
|
|
2010-01-12 21:50:19 +00:00
|
|
|
(prefix + 'data/ring').mkpath
|
|
|
|
(prefix + 'data/dets').mkpath
|
2011-01-12 22:11:17 +00:00
|
|
|
|
|
|
|
# Install man pages
|
|
|
|
man1.install Dir["doc/man/man1/*"]
|
2010-01-12 21:50:19 +00:00
|
|
|
end
|
2011-01-12 22:11:17 +00:00
|
|
|
end
|
2011-10-24 19:35:52 +00:00
|
|
|
|
|
|
|
__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}.
|
|
|
|
|