homebrew-core/Formula/mesos.rb

50 lines
1.4 KiB
Ruby
Raw Normal View History

2013-11-09 01:13:19 +00:00
require "formula"
class Mesos < Formula
homepage "http://mesos.apache.org"
url "http://mirror.cogentco.com/pub/apache/mesos/0.20.1/mesos-0.20.1.tar.gz"
sha1 "8028366a2538551daaf290f7c62c4c8bfb415f61"
2013-11-09 01:13:19 +00:00
bottle do
2014-09-27 17:42:31 +00:00
sha1 "ad8e8a6a5f5a0bd2de953d799999a23d11e60a04" => :mavericks
sha1 "78dfc152a6fd45aabd606683a88c699ff871ae31" => :mountain_lion
end
2014-07-21 09:17:12 +00:00
depends_on :java => "1.7"
depends_on :macos => :mountain_lion
2013-11-09 01:13:19 +00:00
depends_on "maven" => :build
def install
system "./configure", "--disable-debug",
"--disable-dependency-tracking",
"--disable-silent-rules",
"--prefix=#{prefix}"
system "make"
system "make", "install"
end
test do
require "timeout"
master = fork do
exec "#{sbin}/mesos-master", "--ip=127.0.0.1",
"--registry=in_memory"
end
slave = fork do
exec "#{sbin}/mesos-slave", "--master=127.0.0.1:5050",
"--work_dir=#{testpath}"
end
Timeout::timeout(15) do
system "#{bin}/mesos", "execute",
"--master=127.0.0.1:5050",
"--name=execute-touch",
"--command=touch\s#{testpath}/executed"
end
Process.kill("TERM", master)
Process.kill("TERM", slave)
system "[ -e #{testpath}/executed ]"
2013-11-09 01:13:19 +00:00
end
end