From 3f87b7a02ad26aedc255477f7ac0f87317331ab1 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 23 Nov 2022 18:27:45 -0500 Subject: [PATCH] Make md2man usage conditional on golang_arches --- netavark.spec | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/netavark.spec b/netavark.spec index af3413c..66bc2a0 100644 --- a/netavark.spec +++ b/netavark.spec @@ -19,7 +19,9 @@ URL: https://github.com/containers/%{name} Source0: %{url}/archive/%{built_tag}.tar.gz Source1: %{url}/releases/download/%{built_tag}/%{name}-%{built_tag}-vendor.tar.gz BuildRequires: cargo +%ifarch %{golang_arches} BuildRequires: go-md2man +%endif Recommends: aardvark-dns >= 1.2.0 Requires: (aardvark-dns >= 1.2.0 if fedora-release-identity-server) Provides: container-network-stack = 2 @@ -211,17 +213,26 @@ EOF %build %{__make} build +%ifarch %{golang_arches} cd docs go-md2man -in %{name}.1.md -out %{name}.1 +%endif %install +%ifarch %{golang_arches} %{__make} DESTDIR=%{buildroot} PREFIX=%{_prefix} install +%else +# no manpage, install only the binary +install -D -m0755 bin/netavark %{buildroot}%{_libexecdir}/podman/%{name} +%endif %files %license LICENSE %dir %{_libexecdir}/podman %{_libexecdir}/podman/%{name} +%ifarch %{golang_arches} %{_mandir}/man1/%{name}.1* +%endif %changelog %autochangelog