class Wai < Formula desc "WAI, an open media standard: its command line, and a local relay and room service" homepage "https://wai.transaction.science/docs/quickstart/" version "0.5.0" license "Apache-2.0" on_macos do on_arm do url "https://git.transaction.science/Transaction-Science/open-standards/releases/download/wai-v0.5.0/wai-0.5.0-aarch64-apple-darwin.tar.gz" sha256 "452eb03709593107398934a1c2154f12b4263ddca456379b7978a08c3032e351" end on_intel do url "https://git.transaction.science/Transaction-Science/open-standards/releases/download/wai-v0.5.0/wai-0.5.0-x86_64-apple-darwin.tar.gz" sha256 "815225ac3a594817b574f71a66990935b031292642cbb6b6e757b5956c7f1e7c" end end on_linux do on_arm do url "https://git.transaction.science/Transaction-Science/open-standards/releases/download/wai-v0.5.0/wai-0.5.0-aarch64-unknown-linux-musl.tar.gz" sha256 "5fcc769aaac2e04081edac752e7bc4240de0b21b97fbca33d790eac7579ec92f" end on_intel do url "https://git.transaction.science/Transaction-Science/open-standards/releases/download/wai-v0.5.0/wai-0.5.0-x86_64-unknown-linux-musl.tar.gz" sha256 "138862c665d43b3e1f2b19c90b0d983a78c25183a5a2fedc9793f0857cf16fea" end end # The quantum command line is a formula of its own: one copy, whichever is installed first. depends_on "transaction-science/tap/wai-quantum" def install # bin/ and share/wai/ side by side: `wai dev` finds the relay, the room service, the room # client and WAI Studio beside its own binary. The archive's bin/wai-quantum is install.sh's; # here it is the dependency's. bin.install "bin/wai", "bin/wai-relay", "bin/wai-room", "bin/wai-ingest", "bin/wai-remote-host", "bin/wai-pack" (share/"wai").install "share/wai/web", "share/wai/studio" end test do assert_match "video-room", shell_output("#{bin}/wai create --list") assert_match "delivered-verified", shell_output("#{bin}/wai hello #{testpath}/hello") assert_match "verified", shell_output("#{bin}/wai verify #{testpath}/hello") end end