recipe update to v0.7 for cassandra

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
This commit is contained in:
Igor Serko 2011-01-28 15:24:54 +00:00 committed by Adam Vandenberg
parent 5b113f0af0
commit 3aeda8f29d

View file

@ -1,24 +1,24 @@
require 'formula'
class Cassandra <Formula
url 'http://www.mirrorservice.org/sites/ftp.apache.org//cassandra/0.6.8/apache-cassandra-0.6.8-bin.tar.gz'
url 'http://www.mirrorservice.org/sites/ftp.apache.org//cassandra/0.7.0/apache-cassandra-0.7.0-bin.tar.gz'
homepage 'http://cassandra.apache.org'
md5 'a1a15b00e78fd3148c37d45900e08829'
md5 '475eb1a95fe8a4def78903bc6726852e'
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 "conf/cassandra.yaml", "/var/lib/cassandra", "#{var}/lib/cassandra"
inreplace "conf/log4j-server.properties", "/var/log/cassandra", "#{var}/log/cassandra"
inreplace "bin/cassandra.in.sh" do |s|
s.gsub! "cassandra_home=`dirname $0`/..", "cassandra_home=#{prefix}"
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"
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"
s.gsub! "$CASSANDRA_HOME/lib/*.jar", "$CASSANDRA_HOME/*.jar"
end
rm Dir["bin/*.bat"]