Conditionalize building the manpage
The manpage generator only works on architectures where golang is supported. On ELN/RHEL 10, this excludes i686. Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
This commit is contained in:
parent
becbe742f8
commit
32fb4fc36e
18
conmon.spec
18
conmon.spec
@ -7,6 +7,12 @@
|
|||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?rhel}
|
||||||
|
%bcond_with docs
|
||||||
|
%else
|
||||||
|
%bcond_without docs
|
||||||
|
%endif
|
||||||
|
|
||||||
%global built_tag v2.1.5
|
%global built_tag v2.1.5
|
||||||
%global built_tag_strip %(b=%{built_tag}; echo ${b:1})
|
%global built_tag_strip %(b=%{built_tag}; echo ${b:1})
|
||||||
%global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"})
|
%global gen_version %(b=%{built_tag_strip}; echo ${b/-/"~"})
|
||||||
@ -20,7 +26,10 @@ Summary: OCI container runtime monitor
|
|||||||
URL: https://github.com/containers/%{name}
|
URL: https://github.com/containers/%{name}
|
||||||
# Tarball fetched from upstream
|
# Tarball fetched from upstream
|
||||||
Source0: %{url}/archive/%{built_tag}.tar.gz
|
Source0: %{url}/archive/%{built_tag}.tar.gz
|
||||||
|
%if %{with docs}
|
||||||
|
ExclusiveArch: %{go_arches}
|
||||||
BuildRequires: go-md2man
|
BuildRequires: go-md2man
|
||||||
|
%endif
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: git-core
|
BuildRequires: git-core
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: glib2-devel
|
||||||
@ -42,11 +51,17 @@ sed -i 's/install.crio: bin\/conmon/install.crio:/' Makefile
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%{__make} DEBUGFLAG="-g" bin/conmon
|
%{__make} DEBUGFLAG="-g" bin/conmon
|
||||||
|
|
||||||
|
%if %{with docs}
|
||||||
%{__make} GOMD2MAN=go-md2man -C docs
|
%{__make} GOMD2MAN=go-md2man -C docs
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%{__make} PREFIX=%{buildroot}%{_prefix} install.bin install.crio
|
%{__make} PREFIX=%{buildroot}%{_prefix} install.bin install.crio
|
||||||
|
|
||||||
|
%if %{with docs}
|
||||||
%{__make} PREFIX=%{buildroot}%{_prefix} -C docs install
|
%{__make} PREFIX=%{buildroot}%{_prefix} -C docs install
|
||||||
|
%endif
|
||||||
|
|
||||||
#define license tag if not already defined
|
#define license tag if not already defined
|
||||||
%{!?_licensedir:%global license %doc}
|
%{!?_licensedir:%global license %doc}
|
||||||
@ -57,7 +72,10 @@ sed -i 's/install.crio: bin\/conmon/install.crio:/' Makefile
|
|||||||
%{_bindir}/%{name}
|
%{_bindir}/%{name}
|
||||||
%{_libexecdir}/crio/%{name}
|
%{_libexecdir}/crio/%{name}
|
||||||
%dir %{_libexecdir}/crio
|
%dir %{_libexecdir}/crio
|
||||||
|
|
||||||
|
%if %{with docs}
|
||||||
%{_mandir}/man8/%{name}.8.gz
|
%{_mandir}/man8/%{name}.8.gz
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
%autochangelog
|
%autochangelog
|
||||||
|
Loading…
Reference in New Issue
Block a user