homebrew-fuse/Formula/gcsfuse-mac.rb

50 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"
2023-04-13 18:05:54 +08:00
url "https://github.com/GoogleCloudPlatform/gcsfuse/archive/v0.42.3.tar.gz"
sha256 "1a87747192ff4a1219d5985fa09048ddebf2b30dd4f7f1c4d786a648ceba3a90"
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
regex(/^v?(\d+(?:\.\d+)+)$/i)
end
2021-04-27 13:42:59 +08:00
bottle do
2023-04-13 18:05:54 +08:00
root_url "https://github.com/gromgit/homebrew-fuse/releases/download/gcsfuse-mac-0.42.3"
2023-04-13 18:22:42 +08:00
sha256 cellar: :any_skip_relocation, arm64_monterey: "0a540eee3f019333851d3b3aba7ef2d34cec94e59ac4c0ebcfa47a41fd49a8b9"
sha256 cellar: :any_skip_relocation, monterey: "cdfa3d98d870c22ee07bd01165d6c8ee94c48c66bca795061914a81169311753"
sha256 cellar: :any_skip_relocation, big_sur: "c12a8e567d04163e6a6a94dcf2481195aaa06d6185acb24d3614ea699904ff69"
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