Control optional test with a macro

epel9
Petr Písař 7 years ago
parent 8bd87e81a3
commit e0cec7bddd

@ -1,3 +1,10 @@
# Run optional test
%if ! 0%{?rhel}
%bcond_without perl_YAML_Syck_enables_optional_test
%else
%bcond_with perl_YAML_Syck_enables_optional_test
%endif
Name: perl-YAML-Syck Name: perl-YAML-Syck
Version: 1.30 Version: 1.30
Release: 5%{?dist} Release: 5%{?dist}
@ -32,9 +39,11 @@ BuildRequires: perl(IO::File)
BuildRequires: perl(Storable) BuildRequires: perl(Storable)
BuildRequires: perl(Test::More) BuildRequires: perl(Test::More)
BuildRequires: perl(Tie::Hash) BuildRequires: perl(Tie::Hash)
%if %{with perl_YAML_Syck_enables_optional_test}
# Optional tests # Optional tests
BuildRequires: perl(Devel::Leak) BuildRequires: perl(Devel::Leak)
BuildRequires: perl(JSON) BuildRequires: perl(JSON)
%endif
# Dependencies # Dependencies
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(XSLoader) Requires: perl(XSLoader)

Loading…
Cancel
Save