ssdb 1.9.2
* Update to 1.9.2 * Patch and install ssdb-cli * Separate data directory for ssdb slave * Fix ssdb-ins.sh script Closes Homebrew/homebrew#44552. Signed-off-by: Alex Dunn <dunn.alex@gmail.com>
This commit is contained in:
parent
e578fec337
commit
3a932d8cef
1 changed files with 17 additions and 9 deletions
|
@ -1,8 +1,8 @@
|
|||
class Ssdb < Formula
|
||||
desc "NoSQL database supporting many data structures: Redis alternative"
|
||||
homepage "http://ssdb.io/"
|
||||
url "https://github.com/ideawu/ssdb/archive/1.8.2.tar.gz"
|
||||
sha256 "2fe10689a0e1e9e9ca67acbe9e0fa3607810dca90dcc9f0813b2661cc6d4e826"
|
||||
url "https://github.com/ideawu/ssdb/archive/1.9.2.tar.gz"
|
||||
sha256 "9387ebeaf24f4e3355967ba2459b59be683f75d6423f408ce4cefed2596b4736"
|
||||
head "https://github.com/ideawu/ssdb.git"
|
||||
|
||||
bottle do
|
||||
|
@ -13,17 +13,25 @@ class Ssdb < Formula
|
|||
end
|
||||
|
||||
def install
|
||||
inreplace "Makefile", "PREFIX=/usr/local/ssdb", "PREFIX=#{prefix}"
|
||||
inreplace "tools/ssdb-cli", "DIR=`dirname $0`", "DIR=#{prefix}"
|
||||
|
||||
system "make", "prefix=#{prefix} CC=#{ENV.cc} CXX=#{ENV.cxx}"
|
||||
system "make", "install"
|
||||
system "make", "CC=#{ENV.cc}", "CXX=#{ENV.cxx}"
|
||||
system "make", "install", "PREFIX=#{prefix}"
|
||||
|
||||
["bench", "dump", "ins.sh", "repair", "server"].each do |suffix|
|
||||
inreplace "#{prefix}/ssdb-ins.sh" do |s|
|
||||
# Fix path to ssdb-server.
|
||||
s.gsub! "/usr/local/ssdb", bin
|
||||
# Fix handling of absolute pid path in config.
|
||||
s.gsub! "dir=`dirname $config`\n", ""
|
||||
s.gsub! %r{\$dir/`(.*?) \| sed -n 's/\^\\.\\///p'`}, '`\1`'
|
||||
end
|
||||
|
||||
["bench", "cli", "dump", "ins.sh", "repair", "server"].each do |suffix|
|
||||
bin.install "#{prefix}/ssdb-#{suffix}"
|
||||
end
|
||||
|
||||
["run", "db/ssdb", "log"].each do |dir|
|
||||
(var+dir).mkpath
|
||||
["run", "db/ssdb", "db/ssdb_slave", "log"].each do |dir|
|
||||
(var/dir).mkpath
|
||||
end
|
||||
|
||||
inreplace "ssdb.conf" do |s|
|
||||
|
@ -33,7 +41,7 @@ class Ssdb < Formula
|
|||
end
|
||||
|
||||
inreplace "ssdb_slave.conf" do |s|
|
||||
s.gsub! "work_dir = ./var_slave", "work_dir = #{var}/db/ssdb/"
|
||||
s.gsub! "work_dir = ./var_slave", "work_dir = #{var}/db/ssdb_slave/"
|
||||
s.gsub! "pidfile = ./var_slave/ssdb.pid", "pidfile = #{var}/run/ssdb_slave.pid"
|
||||
s.gsub! "\toutput: log_slave.txt", "\toutput: #{var}/log/ssdb_slave.log"
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue