Skip to content

Commit eab7499

Browse files
carlocabBrewTestBot
authored andcommitted
skopeo: build manpages.
The `--help` text refers to manpages, but there are none that ship with the formula. This is pretty confusing, so let's just ship the manpages. Closes Homebrew#109737. Signed-off-by: Rui Chen <rui@chenrui.dev> Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
1 parent c242004 commit eab7499

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

Formula/skopeo.rb

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class Skopeo < Formula
1515
end
1616

1717
depends_on "go" => :build
18+
depends_on "go-md2man" => :build
1819
depends_on "gpgme"
1920

2021
on_linux do
@@ -25,7 +26,7 @@ class Skopeo < Formula
2526
def install
2627
ENV["CGO_ENABLED"] = "1"
2728
ENV.append "CGO_FLAGS", ENV.cppflags
28-
ENV.append "CGO_FLAGS", Utils.safe_popen_read("#{Formula["gpgme"].bin}/gpgme-config", "--cflags")
29+
ENV.append "CGO_FLAGS", Utils.safe_popen_read(Formula["gpgme"].opt_bin/"gpgme-config", "--cflags")
2930

3031
buildtags = [
3132
"containers_image_ostree_stub",
@@ -34,16 +35,17 @@ def install
3435
Utils.safe_popen_read("hack/libdm_tag.sh").chomp,
3536
].uniq.join(" ")
3637

37-
ldflags = [
38-
"-X main.gitCommit=",
39-
"-X github.com/containers/image/v5/docker.systemRegistriesDirPath=#{etc/"containers/registries.d"}",
40-
"-X github.com/containers/image/v5/internal/tmpdir.unixTempDirForBigFiles=/var/tmp",
41-
"-X github.com/containers/image/v5/signature.systemDefaultPolicyPath=#{etc/"containers/policy.json"}",
42-
"-X github.com/containers/image/v5/pkg/sysregistriesv2.systemRegistriesConfPath=" \
43-
"#{etc/"containers/registries.conf"}",
44-
].join(" ")
38+
ldflag_prefix = "github.com/containers/image/v5"
39+
ldflags = %W[
40+
-X main.gitCommit=
41+
-X #{ldflag_prefix}/docker.systemRegistriesDirPath=#{etc}/containers/registries.d
42+
-X #{ldflag_prefix}/internal/tmpdir.unixTempDirForBigFiles=/var/tmp
43+
-X #{ldflag_prefix}/signature.systemDefaultPolicyPath=#{etc}/containers/policy.json
44+
-X #{ldflag_prefix}/pkg/sysregistriesv2.systemRegistriesConfPath=#{etc}/containers/registries.conf
45+
]
4546

46-
system "go", "build", "-tags", buildtags, "-ldflags", ldflags, *std_go_args, "./cmd/skopeo"
47+
system "go", "build", "-tags", buildtags, *std_go_args(ldflags: ldflags), "./cmd/skopeo"
48+
system "make", "PREFIX=#{prefix}", "GOMD2MAN=go-md2man", "install-docs"
4749

4850
(etc/"containers").install "default-policy.json" => "policy.json"
4951
(etc/"containers/registries.d").install "default.yaml"

0 commit comments

Comments
 (0)