homebrew-fuse/Formula/goofys-mac.rb

42 lines
1.3 KiB
Ruby
Raw Normal View History

2021-05-04 00:21:49 +08:00
require_relative "../require/macfuse"
class GoofysMac < Formula
desc "Filey-System interface to Amazon S3"
homepage "https://github.com/kahing/goofys"
url "https://github.com/kahing/goofys.git",
tag: "v0.24.0",
revision: "45b8d78375af1b24604439d2e60c567654bcdf88"
license "Apache-2.0"
head "https://github.com/kahing/goofys.git"
bottle do
root_url "https://github.com/gromgit/homebrew-fuse/releases/download/goofys-mac-0.24.0"
2021-05-04 00:35:16 +08:00
sha256 cellar: :any_skip_relocation, big_sur: "f3f73dc39927ee0a94a26a3bc8ae4b097e083d48e311b79274a85ac7f547e85a"
sha256 cellar: :any_skip_relocation, catalina: "b61cf142b7a484520ad554d17947d7022ed0c3fdab04d6cf89da93b986d6de15"
2021-05-04 00:21:49 +08:00
end
depends_on "go@1.14" => :build
depends_on MacfuseRequirement
depends_on :macos
def install
contents = Dir["*"]
gopath = buildpath/"gopath"
(gopath/"src/github.com/kahing/goofys").install contents
ENV["GOPATH"] = gopath
goofys_version = build.head? ? Utils.git_head : version
cd gopath/"src/github.com/kahing/goofys" do
system "go", "build", *std_go_args,
"-ldflags", "-X main.Version=#{goofys_version}",
"-o", "#{bin}/goofys"
prefix.install_metafiles
end
end
test do
system "#{bin}/goofys", "--version"
end
end