homebrew-core/Formula/cassandra.rb
Adam Vandenberg 7bd947eb0b Update formulae for version 0.7
* Use new "url" features
* Use keg_only DSL
* Use "skip_clean :all" DSL
* Whitespace and style cleanups
* Make bash invocations less silly
* Use new man2-man8 helpers
* Remove "FileUtils." since it is included in Formula
* Use real names for deps instead of aliases
* ENV.x11 now updates path, so remove that from individual brews
2010-08-07 18:08:53 -07:00

30 lines
No EOL
1 KiB
Ruby

require 'formula'
class Cassandra <Formula
url 'http://www.alliedquotes.com/mirrors/apache/cassandra/0.6.4/apache-cassandra-0.6.4-bin.tar.gz'
homepage 'http://cassandra.apache.org'
md5 '3bb41737ef8f1f76cd5d13cb6db5e079'
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