diff --git a/Formula/libcouchbase3.rb b/Formula/libcouchbase3.rb new file mode 100644 index 0000000000000..bb76620ddc0cf --- /dev/null +++ b/Formula/libcouchbase3.rb @@ -0,0 +1,28 @@ +class Libcouchbase3 < Formula + desc "C library for Couchbase" + homepage "https://docs.couchbase.com/c-sdk/3.0/hello-world/start-using-sdk.html" + url "https://packages.couchbase.com/clients/c/libcouchbase-3.0.0.tar.gz" + sha256 "7688aaeb5e5833ef4bfe9ab79da58b7291b2f1c1b49b28e6567b598698a9c026" + head "https://github.com/couchbase/libcouchbase.git" + + depends_on "cmake" => :build + depends_on "libev" + depends_on "libevent" + depends_on "libuv" + depends_on "openssl@1.1" + + def install + mkdir "build" do + system "cmake", "..", *std_cmake_args, + "-DLCB_NO_TESTS=1", + "-DLCB_BUILD_LIBEVENT=ON", + "-DLCB_BUILD_LIBEV=ON", + "-DLCB_BUILD_LIBUV=ON" + system "make", "install" + end + end + + test do + system "#{bin}/cbc", "version" + end +end