33 lines
1.2 KiB
Ruby
33 lines
1.2 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.8.tar.gz"
|
|
sha256 "c8d340121fce011015d74f347bf4071101ef24689fcb354cacc3e1e5797a8733"
|
|
license "Apache-2.0"
|
|
head "https://github.com/GoogleCloudPlatform/gcsfuse.git", branch: "master"
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "bacde7045f120f672172a84558fac45caf573c6b93147eb723dca9a9ea4303fb"
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
depends_on "libfuse"
|
|
depends_on :linux # on macOS, requires closed-source macFUSE
|
|
|
|
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
|