summaryrefslogtreecommitdiff
path: root/contrib/spec/podman.spec.in
diff options
context:
space:
mode:
authorChandan Kumar (raukadah) <raukadah@gmail.com>2019-11-29 16:28:30 +0530
committerChandan Kumar (raukadah) <raukadah@gmail.com>2019-12-03 07:57:50 +0530
commit1414a063f5f198dd165fcfabc1afd4cb008ba402 (patch)
tree8ba41477f362e8a88848628fe007bfcc05e15bf7 /contrib/spec/podman.spec.in
parent7f53178a7dc7cfa947896f61a3198cc6e8759eda (diff)
downloadpodman-1414a063f5f198dd165fcfabc1afd4cb008ba402.tar.gz
podman-1414a063f5f198dd165fcfabc1afd4cb008ba402.tar.bz2
podman-1414a063f5f198dd165fcfabc1afd4cb008ba402.zip
Updates on making doc building and debug optional
It changes the podman spec from using with_doc to bcond_without for building docs so that anyone can pass --without doc as well as other rpmbuild args to the build_rpm.sh script to skip building docs. Since go-md2man is not available in CentOS8 repo. without the help fo extra_args, it makes it conditional. It also moves the manpages to a seperate package. Signed-off-by: Chandan Kumar (raukadah) <raukadah@gmail.com>
Diffstat (limited to 'contrib/spec/podman.spec.in')
-rw-r--r--contrib/spec/podman.spec.in40
1 files changed, 30 insertions, 10 deletions
diff --git a/contrib/spec/podman.spec.in b/contrib/spec/podman.spec.in
index f282642f3..4a3704811 100644
--- a/contrib/spec/podman.spec.in
+++ b/contrib/spec/podman.spec.in
@@ -1,9 +1,9 @@
%global with_devel 0
%global with_bundled 1
-%global with_debug 1
%global with_check 0
%global with_unit_test 0
-%global with_doc 1
+%bcond_without doc
+%bcond_without debug
%if 0%{?fedora} >= 28
%bcond_without varlink
@@ -11,7 +11,7 @@
%bcond_with varlink
%endif
-%if 0%{?with_debug}
+%if %{with debug}
%global _find_debuginfo_dwz_opts %{nil}
%global _dwz_low_mem_die_limit 0
%else
@@ -61,7 +61,7 @@ BuildRequires: glib2-devel
BuildRequires: glibc-devel
BuildRequires: glibc-static
BuildRequires: git
-%if 0%{?with_doc}
+%if %{with doc}
BuildRequires: go-md2man
%endif
BuildRequires: gpgme-devel
@@ -355,6 +355,15 @@ This package contains unit tests for project
providing packages with %{import_path} prefix.
%endif
+%if %{with doc}
+%package manpages
+Summary: Man pages for the %{name} commands
+BuildArch: noarch
+
+%description manpages
+Man pages for the %{name} commands
+%endif
+
%prep
%autosetup -Sgit -n %{repo}-%{shortcommit0}
@@ -363,7 +372,7 @@ 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}
+%if %{with doc}
sed -i 's/install.man: docs/install.man:/' Makefile
%endif
@@ -379,7 +388,7 @@ export BUILDTAGS="varlink selinux seccomp $(hack/btrfs_installed_tag.sh) $(hack/
GOPATH=$GOPATH go generate ./cmd/podman/varlink/...
-%if 0%{?with_doc}
+%if %{with doc}
BUILDTAGS=$BUILDTAGS make binaries docs
%else
BUILDTAGS=$BUILDTAGS make binaries
@@ -400,6 +409,7 @@ popd
%install
install -dp %{buildroot}%{_unitdir}
install -dp %{buildroot}%{_usr}/lib/systemd/user
+%if %{with doc}
PODMAN_VERSION=%{version} %{__make} PREFIX=%{buildroot}%{_prefix} ETCDIR=%{buildroot}%{_sysconfdir} \
install.bin \
install.remote \
@@ -407,6 +417,14 @@ PODMAN_VERSION=%{version} %{__make} PREFIX=%{buildroot}%{_prefix} ETCDIR=%{build
install.cni \
install.systemd \
install.completions
+%else
+PODMAN_VERSION=%{version} %{__make} PREFIX=%{buildroot}%{_prefix} ETCDIR=%{buildroot}%{_sysconfdir} \
+ install.bin \
+ install.remote \
+ install.cni \
+ install.systemd \
+ install.completions
+%endif
mv pkg/hooks/README.md pkg/hooks/README-hooks.md
@@ -489,10 +507,6 @@ 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
@@ -522,6 +536,12 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
%doc README.md CONTRIBUTING.md pkg/hooks/README-hooks.md install.md code-of-conduct.md transfer.md
%{_bindir}/%{name}-remote
+%if %{with doc}
+%files manpages
+%{_mandir}/man1/*.1*
+%{_mandir}/man5/*.5*
+%endif
+
%changelog
* Sat Aug 4 2018 Dan Walsh <dwalsh@redhat.com> - 0.8.1-1.git6b4ab2a
- Bump to v0.8.1