summaryrefslogtreecommitdiff
path: root/contrib/spec
diff options
context:
space:
mode:
authorChandan Kumar (raukadah) <raukadah@gmail.com>2019-11-28 18:28:35 +0530
committerChandan Kumar (raukadah) <raukadah@gmail.com>2019-11-28 18:40:15 +0530
commit17e4641d45b7b19a7054cef6e4f3c926fc6d8e4f (patch)
tree87423e4b4530aa1d0bf562ee5993be3d788da4e0 /contrib/spec
parent2178875fa7975f00a4da15fef9809cd3fb74feba (diff)
downloadpodman-17e4641d45b7b19a7054cef6e4f3c926fc6d8e4f.tar.gz
podman-17e4641d45b7b19a7054cef6e4f3c926fc6d8e4f.tar.bz2
podman-17e4641d45b7b19a7054cef6e4f3c926fc6d8e4f.zip
Make doc building in spec optional
since go-man2md is not available in CentOS 8, making it optional allows them to build the rpm. Signed-off-by: Chandan Kumar (raukadah) <raukadah@gmail.com>
Diffstat (limited to 'contrib/spec')
-rw-r--r--contrib/spec/podman.spec.in13
1 files changed, 12 insertions, 1 deletions
diff --git a/contrib/spec/podman.spec.in b/contrib/spec/podman.spec.in
index 33ecc8eba..98cd26a4f 100644
--- a/contrib/spec/podman.spec.in
+++ b/contrib/spec/podman.spec.in
@@ -3,6 +3,7 @@
%global with_debug 1
%global with_check 0
%global with_unit_test 0
+%global with_doc 1
%if 0%{?fedora} >= 28
%bcond_without varlink
@@ -57,7 +58,9 @@ BuildRequires: glib2-devel
BuildRequires: glibc-devel
BuildRequires: glibc-static
BuildRequires: git
+%if 0%{?with_doc}
BuildRequires: go-md2man
+%endif
BuildRequires: gpgme-devel
BuildRequires: libassuan-devel
BuildRequires: libgpg-error-devel
@@ -357,7 +360,9 @@ tar zxf %{SOURCE1}
sed -i 's/install.remote: podman-remote/install.remote:/' Makefile
sed -i 's/install.bin: podman/install.bin:/' Makefile
+%if 0%{?with_doc}
sed -i 's/install.man: docs/install.man:/' Makefile
+%endif
%build
mkdir _build
@@ -370,8 +375,12 @@ export GOPATH=$(pwd)/_build:$(pwd):$(pwd):%{gopath}
export BUILDTAGS="varlink selinux seccomp $(hack/btrfs_installed_tag.sh) $(hack/btrfs_tag.sh) $(hack/libdm_tag.sh) exclude_graphdriver_devicemapper"
GOPATH=$GOPATH go generate ./cmd/podman/varlink/...
-BUILDTAGS=$BUILDTAGS make binaries docs
+%if 0%{?with_doc}
+BUILDTAGS=$BUILDTAGS make binaries docs
+%else
+BUILDTAGS=$BUILDTAGS make binaries
+%endif
# build conmon
pushd conmon
@@ -477,8 +486,10 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%license LICENSE
%doc README.md CONTRIBUTING.md pkg/hooks/README-hooks.md install.md code-of-conduct.md transfer.md
%{_bindir}/%{name}
+%if 0%{?with_doc}
%{_mandir}/man1/*.1*
%{_mandir}/man5/*.5*
+%endif
%{_datadir}/bash-completion/completions/*
%{_datadir}/zsh/site-functions/*
%{_libexecdir}/%{name}/conmon