2013-12-02 05:17:12 +00:00
|
|
|
require "formula"
|
2014-09-07 19:27:04 +00:00
|
|
|
require "language/go"
|
2013-12-02 05:17:12 +00:00
|
|
|
|
|
|
|
class Nsq < Formula
|
|
|
|
homepage "http://bitly.github.io/nsq"
|
2014-09-07 19:27:04 +00:00
|
|
|
url "https://github.com/bitly/nsq/archive/v0.2.31.tar.gz"
|
|
|
|
sha1 "614e66746c6b785cffb48a6412e44dd5e0c7b0bd"
|
2013-12-02 05:17:12 +00:00
|
|
|
|
2014-07-25 13:50:20 +00:00
|
|
|
bottle do
|
2014-09-07 19:42:27 +00:00
|
|
|
sha1 "3aceae6d99df6b3fca37a80d4392ea289cf6d39f" => :mavericks
|
|
|
|
sha1 "177831494751c7c171132209cb7f2f0c8ec0cc46" => :mountain_lion
|
|
|
|
sha1 "14d245c6b2112e5d75ad6d7cf06395ad2447538c" => :lion
|
2014-07-25 13:50:20 +00:00
|
|
|
end
|
|
|
|
|
2013-12-02 05:17:12 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
|
2014-09-07 19:27:04 +00:00
|
|
|
go_resource "code.google.com/p/snappy-go" do
|
|
|
|
url "https://code.google.com/p/snappy-go/", :using => :hg,
|
|
|
|
:revision => "12e4b4183793ac4b061921e7980845e750679fd0"
|
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/BurntSushi/toml" do
|
|
|
|
url "https://github.com/BurntSushi/toml.git",
|
|
|
|
:revision => "2dff11163ee667d51dcc066660925a92ce138deb"
|
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/bitly/go-hostpool" do
|
|
|
|
url "https://github.com/bitly/go-hostpool.git",
|
|
|
|
:revision => "58b95b10d6ca26723a7f46017b348653b825a8d6"
|
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/bitly/go-nsq" do
|
|
|
|
url "https://github.com/bitly/go-nsq.git",
|
|
|
|
:revision => "ac221df5bdb6d5bfc624a297b5b00b59d7065be2"
|
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/bitly/go-simplejson" do
|
|
|
|
url "https://github.com/bitly/go-simplejson.git",
|
|
|
|
:revision => "fc395a5db941cf38922b1ccbc083640cd76fe4bc"
|
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/bmizerany/perks" do
|
|
|
|
url "https://github.com/bmizerany/perks.git",
|
|
|
|
:revision => "6cb9d9d729303ee2628580d9aec5db968da3a607"
|
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/mreiferson/go-options" do
|
|
|
|
url "https://github.com/mreiferson/go-options.git",
|
|
|
|
:revision => "896a539cd709f4f39d787562d1583c016ce7517e"
|
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "github.com/mreiferson/go-snappystream" do
|
|
|
|
url "https://github.com/mreiferson/go-snappystream.git",
|
|
|
|
:revision => "307a466b220aaf34bcee2d19c605ed9e96b4bcdb"
|
2013-12-02 05:17:12 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
2014-02-17 16:24:17 +00:00
|
|
|
# build a proper GOPATH tree for local dependencies
|
2014-07-25 12:34:32 +00:00
|
|
|
(buildpath + "src/github.com/bitly/nsq").install "util", "nsqlookupd", "nsqd"
|
2014-02-17 16:24:17 +00:00
|
|
|
(buildpath + "src/github.com/bitly/nsq/nsqadmin").install "nsqadmin/templates" => "templates"
|
2013-12-02 05:17:12 +00:00
|
|
|
|
2014-08-12 22:13:36 +00:00
|
|
|
ENV["GOPATH"] = buildpath
|
2014-09-07 19:27:04 +00:00
|
|
|
Language::Go.stage_deps resources, buildpath/"src"
|
|
|
|
|
2013-12-02 05:17:12 +00:00
|
|
|
system "make"
|
|
|
|
system "make", "DESTDIR=#{prefix}", "PREFIX=", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/nsqd", "--version"
|
|
|
|
end
|
|
|
|
end
|