From a9f5d9fb134e5ccd36051b7b1abeee1647f66f4c Mon Sep 17 00:00:00 2001 From: Ivan Dyachkov Date: Tue, 13 Sep 2022 20:06:35 +0200 Subject: [PATCH] emqx 5.0.11 (new formula) Closes #113988. Signed-off-by: Rui Chen Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com> --- Formula/emqx.rb | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Formula/emqx.rb diff --git a/Formula/emqx.rb b/Formula/emqx.rb new file mode 100644 index 00000000000..0b96a73128d --- /dev/null +++ b/Formula/emqx.rb @@ -0,0 +1,47 @@ +class Emqx < Formula + desc "MQTT broker for IoT" + homepage "https://www.emqx.io/" + url "https://github.com/emqx/emqx/archive/refs/tags/v5.0.11.tar.gz" + sha256 "5b797f768961abccf9ea0050613c02b7d1fc1d3877306d592e72c64a8d95588b" + license "Apache-2.0" + head "https://github.com/emqx/emqx.git", branch: "master" + + depends_on "autoconf" => :build + depends_on "automake" => :build + depends_on "cmake" => :build + depends_on "coreutils" => :build + # emqx cannot be built with Erlang/OTP 25 as of v5.0.11, + # but the support is in the works and is coming soon + depends_on "erlang@24" => :build + depends_on "freetds" => :build + depends_on "libtool" => :build + depends_on "openssl@3" + + uses_from_macos "curl" => :build + uses_from_macos "unzip" => :build + uses_from_macos "zip" => :build + + on_linux do + depends_on "ncurses" + depends_on "zlib" + end + + def install + ENV["PKG_VSN"] = version.to_s + touch(".prepare") + system "make", "emqx-rel" + prefix.install Dir["_build/emqx/rel/emqx/*"] + rm %W[ + #{bin}/emqx.cmd + #{bin}/emqx_ctl.cmd + #{bin}/no_dot_erlang.boot + ] + end + + test do + exec "ln", "-s", testpath, "data" + exec bin/"emqx", "start" + system bin/"emqx_ctl", "status" + system bin/"emqx", "stop" + end +end