homebrew-fuse/Formula/gcsfuse-mac.rb

38 lines
1.5 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/v0.34.1.tar.gz"
sha256 "740b3823a67b7431ac201a5fc715114ecc44ee43b913492c8b837474b22caf0c"
license "Apache-2.0"
head "https://github.com/GoogleCloudPlatform/gcsfuse.git"
bottle do
2021-04-27 14:05:24 +08:00
root_url "https://github.com/gromgit/homebrew-fuse/releases/download/gcsfuse-mac-0.34.1"
2021-04-27 18:43:49 +08:00
sha256 cellar: :any_skip_relocation, big_sur: "aa6c393e63620d59d9fc3cd95a0e2b47bb23d04e63f4af99e5c79a1f1d4b1113"
sha256 cellar: :any_skip_relocation, catalina: "cbd6ae4d73a7a906ef5c84d2d399a02a73dc05c15924d1356d6b03c110a7b2f5"
2021-04-27 18:52:18 +08:00
sha256 cellar: :any_skip_relocation, mojave: "890d1b4e89f2a197700d15c64b1ac1a23eed893d73ec64d650927f5c13029152"
2021-04-27 13:42:59 +08:00
end
depends_on "go" => :build
depends_on MacfuseRequirement
depends_on :macos
def install
# 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
system "./build_gcsfuse", buildpath, prefix, gcsfuse_version
end
test do
system "#{bin}/gcsfuse", "--help"
system "#{sbin}/mount_gcsfuse", "--help"
end
end