heartbeat: generate and install fields.yml into etc/
use native Makefile env var to install pip wheels from source
This commit is contained in:
parent
926da5c538
commit
d9469720a2
1 changed files with 17 additions and 1 deletions
|
@ -14,16 +14,32 @@ class Heartbeat < Formula
|
|||
|
||||
depends_on "go" => :build
|
||||
|
||||
resource "virtualenv" do
|
||||
url "https://files.pythonhosted.org/packages/d4/0c/9840c08189e030873387a73b90ada981885010dd9aea134d6de30cd24cb8/virtualenv-15.1.0.tar.gz"
|
||||
sha256 "02f8102c2436bb03b3ee6dede1919d1dac8a427541652e5ec95171ec8adbc93a"
|
||||
end
|
||||
|
||||
def install
|
||||
ENV["GOPATH"] = buildpath
|
||||
(buildpath/"src/github.com/elastic/beats").install buildpath.children
|
||||
|
||||
ENV.prepend_create_path "PYTHONPATH", buildpath/"vendor/lib/python2.7/site-packages"
|
||||
|
||||
resource("virtualenv").stage do
|
||||
system "python", *Language::Python.setup_install_args(buildpath/"vendor")
|
||||
end
|
||||
|
||||
ENV.prepend_path "PATH", buildpath/"vendor/bin"
|
||||
|
||||
cd "src/github.com/elastic/beats/heartbeat" do
|
||||
system "make"
|
||||
# prevent downloading binary wheels during python setup
|
||||
system "make", "PIP_INSTALL_COMMANDS=--no-binary :all", "python-env"
|
||||
system "make", "DEV_OS=darwin", "update"
|
||||
(libexec/"bin").install "heartbeat"
|
||||
libexec.install "_meta/kibana"
|
||||
|
||||
(etc/"heartbeat").install Dir["heartbeat*.{json,yml}"]
|
||||
(etc/"heartbeat").install Dir["heartbeat*.{json,yml}", "fields.yml"]
|
||||
prefix.install_metafiles
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue