From 369fb01cd1cae5db5268e87a85bb515e3ef09ecf Mon Sep 17 00:00:00 2001 From: Ondrej Mosnacek Date: Wed, 8 Aug 2018 10:02:12 +0200 Subject: [PATCH] Build the 'tests' subpackage conditionally --- libkcapi.spec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libkcapi.spec b/libkcapi.spec index b860f09..3e0651b 100644 --- a/libkcapi.spec +++ b/libkcapi.spec @@ -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 - 1.1.1-12 - Produce a subpackage with test scripts +- Build the 'tests' subpackage conditionally * Wed Aug 01 2018 Ondrej Mosnáček - 1.1.1-11 - Add patch to fix unwanted closing of FD 0