diff --git a/Formula/etcd.rb b/Formula/etcd.rb index 02548d90c1..4ca3edfc0b 100644 --- a/Formula/etcd.rb +++ b/Formula/etcd.rb @@ -16,16 +16,9 @@ class Etcd < Formula depends_on "go" => :build def install - ENV["GOPATH"] = buildpath - - dir = buildpath/"src/github.com/etcd-io/etcd" - dir.install buildpath.children - - cd dir do - system "go", "build", "-ldflags", "-X main.version=#{version}", "-o", bin/"etcd" - system "go", "build", "-ldflags", "-X main.version=#{version}", "-o", bin/"etcdctl", "etcdctl/main.go" - prefix.install_metafiles - end + system "go", "build", "-ldflags", "-s -w -X main.version=#{version}", "-trimpath", "-o", bin/"etcd" + system "go", "build", "-ldflags", "-s -w -X main.version=#{version}", "-trimpath", "-o", bin/"etcdctl", "etcdctl/main.go" + prefix.install_metafiles end plist_options :manual => "etcd"