2014-12-18 13:10:25 +00:00
|
|
|
require "language/go"
|
|
|
|
|
|
|
|
class Asciinema < Formula
|
|
|
|
homepage "https://asciinema.org/"
|
2015-05-25 18:38:53 +00:00
|
|
|
desc "A terminal session recorder"
|
|
|
|
url "https://github.com/asciinema/asciinema/archive/v1.1.0.tar.gz"
|
|
|
|
sha256 "2f03549620534341e883b630c6947c3b4ecd234105ec1d7aa98393a00f0845e8"
|
2015-03-08 11:10:36 +00:00
|
|
|
|
|
|
|
head "https://github.com/asciinema/asciinema.git"
|
2014-12-18 13:10:25 +00:00
|
|
|
|
2014-12-18 15:58:39 +00:00
|
|
|
bottle do
|
2015-02-20 15:36:34 +00:00
|
|
|
cellar :any
|
2015-03-14 17:40:44 +00:00
|
|
|
sha256 "5d87618afe5b7b3decee25d5571f26ef836588250254dfab39d5d77f9100410b" => :yosemite
|
|
|
|
sha256 "9fe846d26e9dd6b2b021a1c326d684015091351ba8b4c6a0918a229f62542383" => :mavericks
|
|
|
|
sha256 "27bde1b4865ced34f9e96b8b9aea5fb6cc4a30dee53e6f5ed1a02a3245de0fa9" => :mountain_lion
|
2014-12-18 15:58:39 +00:00
|
|
|
end
|
|
|
|
|
2014-12-18 13:10:25 +00:00
|
|
|
depends_on "go" => :build
|
|
|
|
|
|
|
|
go_resource "github.com/kr/pty" do
|
2014-12-18 16:06:13 +00:00
|
|
|
url "https://github.com/kr/pty.git",
|
2015-05-25 18:38:53 +00:00
|
|
|
:revision => "5cf931ef8f76dccd0910001d74a58a7fca84a83d"
|
2014-12-18 13:10:25 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "code.google.com/p/go.crypto" do
|
2014-12-18 16:06:13 +00:00
|
|
|
url "https://code.google.com/p/go.crypto/",
|
|
|
|
:revision => "aa2644fe4aa5", :using => :hg
|
2014-12-18 13:10:25 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
go_resource "code.google.com/p/gcfg" do
|
2014-12-18 16:06:13 +00:00
|
|
|
url "https://code.google.com/p/gcfg/",
|
|
|
|
:revision => "c2d3050044d05357eaf6c3547249ba57c5e235cb", :using => :git
|
2014-12-18 13:10:25 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def install
|
|
|
|
ENV["GOPATH"] = buildpath
|
|
|
|
mkdir_p buildpath/"src/github.com/asciinema"
|
2015-03-08 11:10:36 +00:00
|
|
|
ln_s buildpath, buildpath/"src/github.com/asciinema/asciinema"
|
2014-12-18 13:10:25 +00:00
|
|
|
Language::Go.stage_deps resources, buildpath/"src"
|
|
|
|
|
2015-05-25 18:38:53 +00:00
|
|
|
system "go", "build", "-o", bin/"asciinema"
|
2014-12-18 13:10:25 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
2015-03-03 16:26:24 +00:00
|
|
|
ENV["LC_ALL"] = "en_US.UTF-8"
|
2015-03-08 11:10:36 +00:00
|
|
|
system "#{bin}/asciinema", "--version"
|
|
|
|
system "#{bin}/asciinema", "--help"
|
2014-12-18 13:10:25 +00:00
|
|
|
end
|
|
|
|
end
|