mirror of
https://github.com/notherealmarco/coredns-deployment.git
synced 2025-05-05 04:28:38 +02:00
Update homebrew formula to v1.5.2 (#184)
This commit is contained in:
parent
4115d8ef99
commit
838a2b800a
1 changed files with 4 additions and 39 deletions
|
@ -1,10 +1,9 @@
|
|||
require "language/go"
|
||||
|
||||
class Coredns < Formula
|
||||
desc "DNS server that chains plugins"
|
||||
homepage "https://coredns.io"
|
||||
url "https://github.com/coredns/coredns/archive/v0.9.10.tar.gz"
|
||||
sha256 "655ad5ae4a819bf1237ea570a941bf205252c16cdae9d253a832085b26888c33"
|
||||
url "https://github.com/coredns/coredns/releases/download/v1.5.2/coredns_1.5.2_darwin_amd64.tgz"
|
||||
version "1.5.2"
|
||||
sha256 "195c73f6ccbb013b7a326d46cd55c5e0aaa66914cfab97b2030c67ddf2d7b25a"
|
||||
head "https://github.com/coredns/coredns.git"
|
||||
|
||||
def default_coredns_config; <<~EOS
|
||||
|
@ -21,45 +20,11 @@ class Coredns < Formula
|
|||
EOS
|
||||
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
|
||||
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
|
||||
(etc/"coredns").mkpath
|
||||
etc.install "Corefile.example" => "coredns/Corefile"
|
||||
bin.install "coredns"
|
||||
end
|
||||
|
||||
def caveats; <<~EOS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue