-
Notifications
You must be signed in to change notification settings - Fork 644
/
cassandra-0.6.rb
30 lines (24 loc) · 1.06 KB
/
cassandra-0.6.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
require 'formula'
class Cassandra06 < Formula
url 'http://www.mirrorservice.org/sites/ftp.apache.org//cassandra/0.6.8/apache-cassandra-0.6.8-bin.tar.gz'
homepage 'http://cassandra.apache.org'
md5 'a1a15b00e78fd3148c37d45900e08829'
def install
(var+"lib/cassandra").mkpath
(var+"log/cassandra").mkpath
(etc+"cassandra").mkpath
inreplace "conf/storage-conf.xml", "/var/lib/cassandra", "#{var}/lib/cassandra"
inreplace "conf/log4j.properties", "/var/log/cassandra", "#{var}/log/cassandra"
inreplace "bin/cassandra.in.sh" do |s|
s.gsub! "cassandra_home=`dirname $0`/..", "cassandra_home=#{prefix}"
# Store configs in etc, outside of keg
s.gsub! "CASSANDRA_CONF=$cassandra_home/conf", "CASSANDRA_CONF=#{etc}/cassandra"
# Jars installed to prefix, no longer in a lib folder
s.gsub! "$cassandra_home/lib/*.jar", "$cassandra_home/*.jar"
end
rm Dir["bin/*.bat"]
(etc+"cassandra").install Dir["conf/*"]
prefix.install Dir["*.txt"] + Dir["{bin,interface,javadoc}"]
prefix.install Dir["lib/*.jar"]
end
end