homebrew-core/Formula/redis.rb
Adam Vandenberg efdacee1dd redis 1.2.6
2010-03-29 10:12:09 -07:00

29 lines
715 B
Ruby

require 'formula'
class Redis <Formula
url 'http://redis.googlecode.com/files/redis-1.2.6.tar.gz'
homepage 'http://code.google.com/p/redis/'
sha1 'c71aef0b3f31acb66353d86ba57dd321b541043f'
def install
%w( run db/redis log ).each do |path|
(var+path).mkpath
end
ENV.gcc_4_2
system "make"
bin.install %w( redis-benchmark redis-cli redis-server redis-stat )
# Fix up default conf file to match our paths
inreplace "redis.conf" do |s|
s.gsub! "/var/run/redis.pid", "#{var}/run/redis.pid"
s.gsub! "dir ./", "dir #{var}/db/redis/"
end
etc.install "redis.conf"
end
def caveats
"To start redis: $ redis-server #{etc}/redis.conf"
end
end