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.9.tar.gz"
|
|
sha256 "0030114ed5b20cd233192483460bda023e6a18f2da1773d16432e36642c0f945"
|
|
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: "06b275c72a2b39d96de82594c25e8518b173829db355f63d841dd35094ba9506"
|
|
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
|