Use %bcond_without for conditional compilation

epel9
Jan Staněk 5 years ago
parent ecacc806e3
commit bf4503b15e
No known key found for this signature in database
GPG Key ID: 2972F2037B243B6D

@ -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 <jstanek@redhat.com> - 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 <releng@fedoraproject.org> - 2.8.22-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

Loading…
Cancel
Save