diff --git a/libzenohcpp.rb b/libzenohcpp.rb new file mode 100644 index 0000000..0d6bc74 --- /dev/null +++ b/libzenohcpp.rb @@ -0,0 +1,26 @@ +require "json" + +class Libzenohc < Formula + release = JSON.parse(File.read("#{__dir__}/release.json"))[File.basename(__FILE__, ".rb")] + + desc "Zenoh-cpp API (geo-distributed pub/sub/query/storage of data)" + homepage "https://zenoh.io" + + on_macos do + on_intel do + url release["x86_64-url"] + sha256 release["x86_64-sha256"] + end + on_arm do + url release["aarch64-url"] + sha256 release["aarch64-sha256"] + end + end + + def install + lib.install "lib/pkgconfig/zenohcxx.pc" + lib.install "lib/cmake/zenohcxx/zenohcxxConfig.cmake" + lib.install "lib/cmake/zenohcxx/zenohcxxConfigVersion.cmake" + include.install Dir["include/*"] + end +end diff --git a/release.json b/release.json index 428b189..f344921 100644 --- a/release.json +++ b/release.json @@ -5,6 +5,12 @@ "aarch64-url": "https://download.eclipse.org/zenoh/homebrew-tap/zenoh-c-1.0.2-aarch64-apple-darwin-standalone.zip", "aarch64-sha256": "af3595fb6caf9fb5ed6ff07778d5cc8803eb7b7ecfe4e1ef265ccbe647a15c82" }, + "libzenohcpp": { + "x86_64-url": "", + "x86_64-sha256": "", + "aarch64-url": "", + "aarch64-sha256": "" + }, "zenoh": { "x86_64-url": "https://download.eclipse.org/zenoh/homebrew-tap/zenoh-1.0.2-x86_64-apple-darwin-standalone.zip", "x86_64-sha256": "b264a9f0dc504e19c56f914789c58d9b79ffe51f74b99379409793690906ebc3",