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.16",
|
|
:revision => "e8b06fca04811c9faff8e481c367d07b8f5e9a90"
|
|
head "https://github.com/kahing/goofys.git"
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "ff8564a0263b4754b6017e252bb83de9f6948b125beb6f76ea9a822fd1a0c429" => :sierra
|
|
sha256 "5ebcf3e58b46188d21726ad99a9977ee56285046b4782659542af81484e2c1eb" => :el_capitan
|
|
sha256 "9c543fb7b3607bc3d614a806f98d75d9e7af4187395ee878d34446b0c419d67e" => :yosemite
|
|
end
|
|
|
|
depends_on "go" => :build
|
|
depends_on :osxfuse
|
|
|
|
go_resource "github.com/codegangsta/cli" do
|
|
url "https://github.com/codegangsta/cli.git",
|
|
:revision => "f017f86fccc5a039a98f23311f34fdf78b014f78"
|
|
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 => "1c211f0807a3436707409fa313599dd8c7a48664"
|
|
end
|
|
|
|
go_resource "github.com/sirupsen/logrus" do
|
|
url "https://github.com/sirupsen/logrus.git",
|
|
:revision => "68806b4b77355d6c8577a2c8bbc6d547a5272491"
|
|
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 => "eb71ad9bd329b5ac0fd0148dd99bd62e8be8e035"
|
|
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 => "43e60d72a8e2bd92ee98319ba9a384a0e9837c08"
|
|
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
|