diff --git a/perl-IPC-Run.spec b/perl-IPC-Run.spec index af60379..128728d 100644 --- a/perl-IPC-Run.spec +++ b/perl-IPC-Run.spec @@ -1,3 +1,6 @@ +# Perform optinal tests +%bcond_without perl_IPC_Run_enables_optional_test + Name: perl-IPC-Run Version: 20200505.0 Release: 3%{?dist} @@ -49,8 +52,10 @@ BuildRequires: perl(File::Temp) BuildRequires: perl(IO::Tty) BuildRequires: perl(Test::More) >= 0.47 BuildRequires: perl(warnings) +%if %{with perl_IPC_Run_enables_optional_test} # Optional Tests BuildRequires: perl(Readonly) +%endif # Runtime Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(Data::Dumper) @@ -80,6 +85,12 @@ for file in eg/run_daemon eg/abuse/timers eg/abuse/blocking_debug_with_sub_copro perl -pi -e 's,^#!.*/perl,%{__perl}, if ($. == 1)' "$file" done +# Handle optional tests +%if !%{with perl_IPC_Run_enables_optional_test} +rm t/readonly.t +sed -i -e '/^t/readonly\.t/d' MANIFEST +%endif + %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags}