Skip to content
Newer
Older
100644 31 lines (24 sloc) 1.06 KB
58f3ef6 @jhorman Re-adds Cassandra 0.6 formula
jhorman authored Jan 28, 2011
1 require 'formula'
2
3 class Cassandra06 < Formula
4 url 'http://www.mirrorservice.org/sites/ftp.apache.org//cassandra/0.6.8/apache-cassandra-0.6.8-bin.tar.gz'
5 homepage 'http://cassandra.apache.org'
6 md5 'a1a15b00e78fd3148c37d45900e08829'
7
8 def install
9 (var+"lib/cassandra").mkpath
10 (var+"log/cassandra").mkpath
11 (etc+"cassandra").mkpath
12
13 inreplace "conf/storage-conf.xml", "/var/lib/cassandra", "#{var}/lib/cassandra"
14 inreplace "conf/log4j.properties", "/var/log/cassandra", "#{var}/log/cassandra"
15
16 inreplace "bin/cassandra.in.sh" do |s|
17 s.gsub! "cassandra_home=`dirname $0`/..", "cassandra_home=#{prefix}"
18 # Store configs in etc, outside of keg
19 s.gsub! "CASSANDRA_CONF=$cassandra_home/conf", "CASSANDRA_CONF=#{etc}/cassandra"
20 # Jars installed to prefix, no longer in a lib folder
21 s.gsub! "$cassandra_home/lib/*.jar", "$cassandra_home/*.jar"
22 end
23
24 rm Dir["bin/*.bat"]
25
26 (etc+"cassandra").install Dir["conf/*"]
27 prefix.install Dir["*.txt"] + Dir["{bin,interface,javadoc}"]
28 prefix.install Dir["lib/*.jar"]
29 end
30 end
Something went wrong with that request. Please try again.