97 lines
3 KiB
Ruby
97 lines
3 KiB
Ruby
require "language/go"
|
|
|
|
class Goofys < Formula
|
|
desc "Filey-System interface to Amazon S3"
|
|
homepage "https://github.com/kahing/goofys"
|
|
url "https://github.com/kahing/goofys.git",
|
|
:tag => "v0.0.15",
|
|
:revision => "b37d4f8b5fc0a0314a7b7ed66ff76ffa7a365c09"
|
|
head "https://github.com/kahing/goofys.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "dfb53e177f0dfb8290b8a54e81fd1dc24b79917dc0bda246c66e8695895c0a3c" => :sierra
|
|
sha256 "ca98308cad9f85015fbeadc29f71c7fdc649e66550626b62df24f7f7c71c4741" => :el_capitan
|
|
sha256 "9c1739ee7139c1f11c8cf9f797154c2316e19f03361a5cc4e495c1caefd6a485" => :yosemite
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
depends_on :osxfuse
|
|
|
|
go_resource "github.com/codegangsta/cli" do
|
|
url "https://github.com/codegangsta/cli.git",
|
|
:revision => "cfb38830724cc34fedffe9a2a29fb54fa9169cd1"
|
|
end
|
|
|
|
go_resource "github.com/jacobsa/fuse" do
|
|
url "https://github.com/jacobsa/fuse.git",
|
|
:revision => "fe7f3a55dcaa3a8f3d5ff6a85b16b62b7a2c446c"
|
|
end
|
|
|
|
go_resource "github.com/kardianos/osext" do
|
|
url "https://github.com/kardianos/osext.git",
|
|
:revision => "ae77be60afb1dcacde03767a8c37337fad28ac14"
|
|
end
|
|
|
|
go_resource "github.com/sevlyar/go-daemon" do
|
|
url "https://github.com/sevlyar/go-daemon.git",
|
|
:revision => "298c54b0e0ae32ec2c6674fee8b60d2fefa4ae7e"
|
|
end
|
|
|
|
go_resource "github.com/shiena/ansicolor" do
|
|
url "https://github.com/shiena/ansicolor.git",
|
|
:revision => "a422bbe96644373c5753384a59d678f7d261ff10"
|
|
end
|
|
|
|
go_resource "github.com/shirou/gopsutil" do
|
|
url "https://github.com/shirou/gopsutil.git",
|
|
:revision => "3aa2ffab12a1852644f6d33cd782f877272bf305"
|
|
end
|
|
|
|
go_resource "github.com/sirupsen/logrus" do
|
|
url "https://github.com/sirupsen/logrus.git",
|
|
:revision => "181d419aa9e2223811b824e8f0b4af96f9ba9302"
|
|
end
|
|
|
|
go_resource "github.com/stretchr/testify" do
|
|
url "https://github.com/stretchr/testify.git",
|
|
:revision => "890a5c3458b43e6104ff5da8dfa139d013d77544"
|
|
end
|
|
|
|
go_resource "golang.org/x/crypto" do
|
|
url "https://go.googlesource.com/crypto.git",
|
|
:revision => "b176d7def5d71bdd214203491f89843ed217f420"
|
|
end
|
|
|
|
go_resource "golang.org/x/net" do
|
|
url "https://go.googlesource.com/net.git",
|
|
:revision => "1c05540f6879653db88113bc4a2b70aec4bd491f"
|
|
end
|
|
|
|
go_resource "golang.org/x/sys" do
|
|
url "https://go.googlesource.com/sys.git",
|
|
:revision => "e42485b6e20ae7d2304ec72e535b103ed350cc02"
|
|
end
|
|
|
|
def install
|
|
contents = Dir["*"]
|
|
gopath = buildpath/"gopath"
|
|
(gopath/"src/github.com/kahing/goofys").install contents
|
|
|
|
ENV["GOPATH"] = gopath
|
|
|
|
Language::Go.stage_deps resources, gopath/"src"
|
|
|
|
cd gopath/"src/github.com/kahing/goofys" do
|
|
commit = Utils.popen_read("git rev-parse HEAD").chomp
|
|
system "go", "build", "-o", "goofys", "-ldflags",
|
|
"-X main.Version=#{commit}"
|
|
bin.install "goofys"
|
|
prefix.install_metafiles
|
|
end
|
|
end
|
|
|
|
test do
|
|
system "#{bin}/goofys", "--version"
|
|
end
|
|
end
|