Build the 'tests' subpackage conditionally

This commit is contained in:
Ondrej Mosnacek 2018-08-08 10:02:12 +02:00
parent 04ed926005
commit 369fb01cd1

View File

@ -12,6 +12,11 @@
%else
%bcond_with replace_hmaccalc
%endif
%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8
%bcond_without test_package
%else
%bcond_with test_package
%endif
# This package needs at least Linux Kernel v4.10.0.
%global min_kernel_ver 4.10.0
@ -228,12 +233,14 @@ tools to use message digests, symmetric ciphers and random number
generators implemented in the Linux kernel from command line.
%if %{with test_package}
%package tests
Summary: Testing scripts for the %{name} package
Requires: %{name}-tools%{?_isa} == %{version}-%{release}
%description tests
Auxiliary scripts for testing %{name}.
%endif
%prep
@ -430,13 +437,16 @@ popd
%{_mandir}/man1/kcapi*.1.*
%if %{with test_package}
%files tests
%{_libexecdir}/%{name}/*
%endif
%changelog
* Tue Aug 07 2018 Ondrej Mosnáček <omosnace@redhat.com> - 1.1.1-12
- Produce a subpackage with test scripts
- Build the 'tests' subpackage conditionally
* Wed Aug 01 2018 Ondrej Mosnáček <omosnace@redhat.com> - 1.1.1-11
- Add patch to fix unwanted closing of FD 0