gpm 1.0.1 (new formula)
Closes Homebrew/homebrew#26693. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
ab3ebe9269
commit
b38649eddb
1 changed files with 45 additions and 0 deletions
45
Formula/gpm.rb
Normal file
45
Formula/gpm.rb
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
require "formula"
|
||||||
|
|
||||||
|
class GoInstalled < Requirement
|
||||||
|
fatal true
|
||||||
|
default_formula "go"
|
||||||
|
satisfy { which "go" }
|
||||||
|
|
||||||
|
def message
|
||||||
|
"Go is required to use gpm."
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class Gpm < Formula
|
||||||
|
homepage "https://github.com/pote/gpm"
|
||||||
|
url "https://github.com/pote/gpm/archive/v1.0.1.tar.gz"
|
||||||
|
sha1 "f2e74eb20479bff9ddbb05369d19f82290a7b744"
|
||||||
|
|
||||||
|
depends_on GoInstalled
|
||||||
|
|
||||||
|
def install
|
||||||
|
system "./configure", "--prefix=#{prefix}"
|
||||||
|
system "make", "install"
|
||||||
|
end
|
||||||
|
|
||||||
|
test do
|
||||||
|
Pathname("Godeps").write "github.com/pote/gpm-testing-package v6.1"
|
||||||
|
|
||||||
|
ENV["GOPATH"] = testpath
|
||||||
|
system "gpm", "install"
|
||||||
|
|
||||||
|
Pathname("go_code.go").write <<-EOS.undent
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"github.com/pote/gpm-testing-package"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
fmt.Print(gpm_testing_package.Version())
|
||||||
|
}
|
||||||
|
EOS
|
||||||
|
`go run go_code.go` == "v6.1"
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue