38 lines
1.2 KiB
Ruby
38 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.11.tar.gz"
|
|
sha256 "58daf7ac3658bd0a6857bd0a8a2b73672b791662973e2a7bfbfcbc1b6f18102e"
|
|
license "Apache-2.0"
|
|
head "https://github.com/GoogleCloudPlatform/gcsfuse.git", branch: "master"
|
|
|
|
livecheck do
|
|
url :stable
|
|
regex(/^v?(\d+(?:\.\d+)+)$/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any_skip_relocation, x86_64_linux: "42a3b3391cbd21b89e4cdde7eae639549453a6d60c3244708e51b33ce5323956"
|
|
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
|