55 lines
1.6 KiB
Ruby
55 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.35.1.tar.gz"
|
|
sha256 "effcbffa238cf0a97488b4a3b836c0996b1db17a18ad91bf76b5c195a4f5bfed"
|
|
license "Apache-2.0"
|
|
head "https://github.com/GoogleCloudPlatform/gcsfuse.git", branch: "master"
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "a6e7417b5a11ea8587f09dc31fb9eebb9b5e770ec07aec630bac1c9184d19feb"
|
|
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 = "_"
|
|
on_linux do
|
|
separator = "."
|
|
end
|
|
system "#{sbin}/mount#{separator}gcsfuse", "--help"
|
|
end
|
|
end
|