homebrew-fuse/Formula/gcsfuse-mac.rb

70 lines
2.3 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"
url "https://github.com/GoogleCloudPlatform/gcsfuse/archive/refs/tags/v2.4.0.tar.gz"
sha256 "44a9e9da84f04be59ef736d283624c116ec90d103c0f87c874b8ce5e51d5df85"
2021-04-27 13:42:59 +08:00
license "Apache-2.0"
head "https://github.com/GoogleCloudPlatform/gcsfuse.git"
2022-11-25 17:44:29 +08:00
livecheck do
url :stable
strategy :github_latest
2022-11-25 17:44:29 +08:00
end
2021-04-27 13:42:59 +08:00
bottle do
2023-06-06 23:30:12 +08:00
root_url "https://github.com/gromgit/homebrew-fuse/releases/download/gcsfuse-mac-0.42.5"
sha256 cellar: :any_skip_relocation, arm64_monterey: "4c8fe0405b5bd69ad29b9a2d64034c332a190d5c6772fd51c83a40e431ad9ac2"
2023-06-07 00:45:49 +08:00
sha256 cellar: :any_skip_relocation, monterey: "293e9a8e9e00e58df3ff3dd90c9bb81a53d3345c412c4d6cf8b1e344484e1283"
2023-06-07 00:17:31 +08:00
sha256 cellar: :any_skip_relocation, big_sur: "7aae298075c4ab1a56635d3bec54360e6986c59596b66a132fcc2cdba8633a14"
2021-04-27 13:42:59 +08:00
end
depends_on "go" => :build
depends_on MacfuseRequirement
depends_on :macos
patch :DATA
2022-06-17 11:09:28 +08:00
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.to_s
system "./build_gcsfuse", buildpath, prefix, gcsfuse_version
2021-04-27 13:42:59 +08:00
end
2025-02-11 20:48:52 +08:00
def caveats
<<~EOS
Upstream hasn't decided whether to support macOS (https://github.com/GoogleCloudPlatform/gcsfuse/issues/1299)
and versions after v2.4.0 don't build at all on macOS.
2025-02-11 20:48:52 +08:00
This formula will not be updated until macOS is officially supported.
EOS
end
2021-04-27 13:42:59 +08:00
test do
system bin/"gcsfuse", "--help"
2021-04-27 13:42:59 +08:00
system "#{sbin}/mount_gcsfuse", "--help"
end
end
__END__
diff --git a/tools/build_gcsfuse/main.go b/tools/build_gcsfuse/main.go
index b1a4022..678f747 100644
--- a/tools/build_gcsfuse/main.go
+++ b/tools/build_gcsfuse/main.go
@@ -134,8 +134,6 @@ func buildBinaries(dstDir, srcDir, version string, buildArgs []string) (err erro
cmd := exec.Command(
"go",
"build",
- "-C",
- srcDir,
"-o",
path.Join(dstDir, bin.outputPath))