33 lines
998 B
Ruby
33 lines
998 B
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.20.1.tar.gz"
|
||
|
sha256 "cd79b22e9c00ddb2d747a2c0efb3dc73fd9fd19030767106154a3dab0009ff3f"
|
||
|
head "https://github.com/GoogleCloudPlatform/gcsfuse.git"
|
||
|
|
||
|
depends_on :osxfuse
|
||
|
|
||
|
depends_on "go" => :build
|
||
|
|
||
|
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.
|
||
|
if build.head?
|
||
|
gcsfuse_version = `git rev-parse --short HEAD`.strip
|
||
|
else
|
||
|
gcsfuse_version = version
|
||
|
end
|
||
|
|
||
|
system "./build_gcsfuse", buildpath, prefix, gcsfuse_version
|
||
|
end
|
||
|
|
||
|
test do
|
||
|
system "#{bin}/gcsfuse", "--help"
|
||
|
system "#{sbin}/mount_gcsfuse", "--help"
|
||
|
end
|
||
|
end
|