diff --git a/uglify-js.spec b/uglify-js.spec index aa52958..7df6a38 100644 --- a/uglify-js.spec +++ b/uglify-js.spec @@ -1,7 +1,7 @@ %{?nodejs_find_provides_and_requires} #enable/disable tests in case the deps aren't there -%global enable_tests 1 +%bcond_without tests Name: uglify-js Version: 2.8.22 @@ -20,7 +20,7 @@ Provides: nodejs-uglify-js = %{version}-%{release} BuildRequires: nodejs-packaging BuildRequires: web-assets-devel -%if 0%{?enable_tests} +%if %{with tests} BuildRequires: npm(acorn) BuildRequires: npm(async) BuildRequires: npm(mocha) @@ -92,7 +92,7 @@ ln -sf uglify-js@2 %{buildroot}%{nodejs_sitelib}/uglify-js %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' -%if 0%{?enable_tests} +%if %{with tests} # Prevent timeout error on an ARM builder which is slower than the x86 builder. sed -i '/timeout/ s/5000/10000/' test/mocha/cli.js sed -i '/timeout/ s/10000/20000/' test/mocha/let.js @@ -133,6 +133,7 @@ end * Wed Jan 22 2020 Jan Staněk - 2.8.22-8 - Remove unneeded legacy conditionals around %%{nodejs_arches} and %%{_jsdir} - Disable colors in tests +- Use %%bcond_without for conditional compilation * Sat Jul 27 2019 Fedora Release Engineering - 2.8.22-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild