Add macro to control docbook-utils-pdf dependency

Signed-off-by: yixiangzhike <yixiangzhike007@163.com>
This commit is contained in:
yixiangzhike 2022-07-13 14:43:55 +08:00
parent 8f30df2154
commit 1e715bf320

View File

@ -2,9 +2,15 @@
%global sysctl_optmem_max 81920
%global distroname_ext %{_vendor}
%if %{?openEuler:1}0
%define enable_docbook_pdf 1
%else
%define enable_docbook_pdf 0
%endif
Name: libkcapi
Version: 1.3.1
Release: 4
Release: 5
Summary: libkcapi - Linux Kernel Crypto API User Space Interface Library
License: BSD or GPLv2
@ -15,8 +21,11 @@ Source1: http://www.chronox.de/%{name}/%{name}-%{version}.tar.xz.asc
Patch0: libkcapi-1.1.1-lib_Fix_kcapi_handle_destroy_closing_FD_0.patch
Patch1: backport-Fix-printf-usage-errors-highlighted-by-covscan.patch
BuildRequires: clang coreutils cppcheck docbook-utils-pdf gcc hardlink
BuildRequires: clang coreutils cppcheck gcc hardlink
BuildRequires: libtool openssl perl systemd xmlto kernel-headers >= 4.10.0
%if 0%{?enable_docbook_pdf}
BuildRequires: docbook-utils-pdf
%endif
Requires: systemd
@ -125,7 +134,10 @@ install -Dpm 0644 -t %{buildroot}%{_sysctldir} %{sysctl_prio}-%{name}-optmem_max
# Install into proper location for inclusion by %%doc.
mkdir -p %{buildroot}%{_pkgdocdir}
install -Dpm 0644 -t %{buildroot}%{_pkgdocdir} README.%{distroname_ext} README.md CHANGES.md TODO doc/%{name}.p{df,s}
install -Dpm 0644 -t %{buildroot}%{_pkgdocdir} README.%{distroname_ext} README.md CHANGES.md TODO
%if 0%{?enable_docbook_pdf}
install -Dpm 0644 -t %{buildroot}%{_pkgdocdir} doc/%{name}.p{df,s}
%endif
cp -pr lib/doc/html %{buildroot}%{_pkgdocdir}
# Install replacement tools, if enabled.
@ -199,6 +211,12 @@ popd
%{_mandir}/man3/kcapi_*.3.*
%changelog
* Wed Jul 13 2022 yixiangzhike <yixiangzhike007@163.com> - 1.3.1-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add macro to control docbook-utils-pdf dependency
* Fri Apr 29 2022 yixiangzhike <yixiangzhike007@163.com> - 1.3.1-4
- Type:bugfix
- ID:NA