2014-03-26 09:24:46 +00:00
|
|
|
require "formula"
|
|
|
|
|
|
|
|
class Sparkey < Formula
|
|
|
|
homepage "https://github.com/spotify/sparkey/"
|
|
|
|
url "https://github.com/spotify/sparkey/archive/sparkey-0.2.0.tar.gz"
|
|
|
|
sha1 "1b7dca2410dffb55d96b8e6eef384830b7d96553"
|
|
|
|
|
2014-03-26 16:46:08 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
|
|
|
sha1 "5dfa39af0fe70769f77637c7fdbfffd67f273621" => :mavericks
|
|
|
|
sha1 "49276b9522232bdcfef1d0b4f43fb3c314b1a98d" => :mountain_lion
|
|
|
|
sha1 "6ae3cff3918cd0f4fbdcecc830a89118eaf4e453" => :lion
|
|
|
|
end
|
|
|
|
|
2014-03-26 09:24:46 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
2014-03-26 16:54:25 +00:00
|
|
|
depends_on "snappy"
|
2014-03-26 09:24:46 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
system "autoreconf", "--install"
|
|
|
|
system "./configure", "--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--disable-silent-rules",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2014-05-20 02:41:24 +00:00
|
|
|
system "#{bin}/sparkey createlog -c snappy test.spl"
|
|
|
|
system "echo foo.bar | #{bin}/sparkey appendlog -d . test.spl"
|
|
|
|
system "#{bin}/sparkey writehash test.spl"
|
|
|
|
system "#{bin}/sparkey get test.spi foo | grep ^bar$"
|
2014-03-26 09:24:46 +00:00
|
|
|
end
|
|
|
|
end
|