Update homebrew formula to v1.5.2 (#184)

This commit is contained in:
Frederic Hemberger 2019-07-29 19:07:46 +02:00 committed by Chris O'Haver
parent 4115d8ef99
commit 838a2b800a

View file

@ -1,10 +1,9 @@
require "language/go"
class Coredns < Formula class Coredns < Formula
desc "DNS server that chains plugins" desc "DNS server that chains plugins"
homepage "https://coredns.io" homepage "https://coredns.io"
url "https://github.com/coredns/coredns/archive/v0.9.10.tar.gz" url "https://github.com/coredns/coredns/releases/download/v1.5.2/coredns_1.5.2_darwin_amd64.tgz"
sha256 "655ad5ae4a819bf1237ea570a941bf205252c16cdae9d253a832085b26888c33" version "1.5.2"
sha256 "195c73f6ccbb013b7a326d46cd55c5e0aaa66914cfab97b2030c67ddf2d7b25a"
head "https://github.com/coredns/coredns.git" head "https://github.com/coredns/coredns.git"
def default_coredns_config; <<~EOS def default_coredns_config; <<~EOS
@ -21,45 +20,11 @@ class Coredns < Formula
EOS EOS
end end
depends_on "go" => :build
go_resource "github.com/mholt/caddy" do
url "https://github.com/mholt/caddy.git",
:revision => "fc75527eb5ea9d0252bb3079a0137dbbfb754790"
end
go_resource "github.com/miekg/dns" do
url "https://github.com/miekg/dns.git",
:revision => "822ae18e7187e1bbde923a37081f6c1b8e9ba68a"
end
go_resource "golang.org/x/text" do
url "https://go.googlesource.com/text.git",
:revision => "c01e4764d870b77f8abe5096ee19ad20d80e8075"
end
go_resource "golang.org/x/net" do
url "https://go.googlesource.com/net.git",
:revision => "5561cd9b4330353950f399814f427425c0a26fd2"
end
def install def install
ENV["GOPATH"] = buildpath
ENV["GOOS"] = "darwin"
ENV["GOARCH"] = Hardware::CPU.is_64_bit? ? "amd64" : "386"
(buildpath/"src/github.com/coredns/coredns").install buildpath.children
Language::Go.stage_deps resources, buildpath/"src"
cd "src/github.com/coredns/coredns" do
system "go", "build", "-ldflags",
"-X github.com/coredns/coredns/coremain.gitTag=#{version}",
"-o", sbin/"coredns"
end
(buildpath/"Corefile.example").write default_coredns_config (buildpath/"Corefile.example").write default_coredns_config
(etc/"coredns").mkpath (etc/"coredns").mkpath
etc.install "Corefile.example" => "coredns/Corefile" etc.install "Corefile.example" => "coredns/Corefile"
bin.install "coredns"
end end
def caveats; <<~EOS def caveats; <<~EOS