From 1e715bf3207e4d8b57917257f4e3b87ecb9a06f5 Mon Sep 17 00:00:00 2001 From: yixiangzhike Date: Wed, 13 Jul 2022 14:43:55 +0800 Subject: [PATCH] Add macro to control docbook-utils-pdf dependency Signed-off-by: yixiangzhike --- libkcapi.spec | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/libkcapi.spec b/libkcapi.spec index a1c5953..4d1cfae 100644 --- a/libkcapi.spec +++ b/libkcapi.spec @@ -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 - 1.3.1-5 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC:add macro to control docbook-utils-pdf dependency + * Fri Apr 29 2022 yixiangzhike - 1.3.1-4 - Type:bugfix - ID:NA