56 lines
1.6 KiB
Ruby
56 lines
1.6 KiB
Ruby
class Gcsfuse < Formula
|
|
desc "User-space file system for interacting with Google Cloud"
|
|
homepage "https://github.com/googlecloudplatform/gcsfuse"
|
|
url "https://github.com/GoogleCloudPlatform/gcsfuse/archive/v0.41.0.tar.gz"
|
|
sha256 "7c3833ed090da8aa762fe831fd7c27d73273c5f47ce431dff4100c330bf53047"
|
|
license "Apache-2.0"
|
|
head "https://github.com/GoogleCloudPlatform/gcsfuse.git", branch: "master"
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "a27112808fc54795d62d27a921977a88428587c1c1415050d7934634ac0cf638"
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
|
|
on_macos do
|
|
disable! date: "2021-04-08", because: "requires closed-source macFUSE"
|
|
end
|
|
|
|
on_linux do
|
|
depends_on "libfuse"
|
|
end
|
|
|
|
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
|
|
|
|
def caveats
|
|
on_macos do
|
|
<<~EOS
|
|
The reasons for disabling this formula can be found here:
|
|
https://github.com/Homebrew/homebrew-core/pull/64491
|
|
|
|
An external tap may provide a replacement formula. See:
|
|
https://docs.brew.sh/Interesting-Taps-and-Forks
|
|
EOS
|
|
end
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/gcsfuse", "--help"
|
|
separator = if OS.mac?
|
|
"_"
|
|
else
|
|
"."
|
|
end
|
|
system "#{sbin}/mount#{separator}gcsfuse", "--help"
|
|
end
|
|
end
|