homebrew-fuse/Formula/gcsfuse-mac.rb

45 lines
1.8 KiB
Ruby
Raw Normal View History

2021-04-27 13:42:59 +08:00
require_relative "../require/macfuse"
2021-04-27 14:05:24 +08:00
class GcsfuseMac < Formula
2021-04-27 13:42:59 +08:00
desc "User-space file system for interacting with Google Cloud"
homepage "https://github.com/googlecloudplatform/gcsfuse"
2022-10-27 20:25:31 +08:00
url "https://github.com/GoogleCloudPlatform/gcsfuse/archive/v0.41.7.tar.gz"
sha256 "07aee73827f06ca823f29020b273969d93494647bf2990847e809c643914c667"
2021-04-27 13:42:59 +08:00
license "Apache-2.0"
head "https://github.com/GoogleCloudPlatform/gcsfuse.git"
bottle do
2022-10-27 20:25:31 +08:00
root_url "https://github.com/gromgit/homebrew-fuse/releases/download/gcsfuse-mac-0.41.7"
sha256 cellar: :any_skip_relocation, arm64_monterey: "2f764ce42156d9eea2c5a21fa1a64cdec9dcdbbd3a0900d7a3c66c834fbae68d"
2022-10-27 20:56:27 +08:00
sha256 cellar: :any_skip_relocation, monterey: "a413eb59bb2aaedb6d45bba2effff877db14f3542fe9e892d58fb707d31427ff"
2022-10-27 21:05:21 +08:00
sha256 cellar: :any_skip_relocation, big_sur: "7f638835861240f42b448fafa0411783b78c6e4937f9582344c6075333549f8c"
2021-04-27 13:42:59 +08:00
end
depends_on "go" => :build
depends_on MacfuseRequirement
depends_on :macos
2022-06-17 11:09:28 +08:00
# Review for removal on next release
patch do
url "https://github.com/GoogleCloudPlatform/gcsfuse/commit/c2abca911ff03b84ab64214b6717d8d7cc74c10f.patch?full_index=1"
sha256 "62930a0ae8322a071d489b1dd386206742b962123312b1368589c731867945b4"
end
2021-04-27 13:42:59 +08:00
def install
setup_fuse
2021-04-27 13:42:59 +08:00
# Build the build_gcsfuse tool. Ensure that it doesn't pick up any
# libraries from the user's GOPATH; it should have no dependencies.
ENV.delete("GOPATH")
system "go", "build", "./tools/build_gcsfuse"
# Use that tool to build gcsfuse itself.
gcsfuse_version = build.head? ? Utils.git_short_head : version
2022-06-17 11:09:28 +08:00
system "./build_gcsfuse", buildpath, prefix, gcsfuse_version, "-buildvcs=false"
2021-04-27 13:42:59 +08:00
end
test do
system "#{bin}/gcsfuse", "--help"
system "#{sbin}/mount_gcsfuse", "--help"
end
end