import uglify-js-2.8.29-4.el8

c8 imports/c8/uglify-js-2.8.29-4.el8
CentOS Sources 3 years ago committed by Andrew Lukoshko
parent 8f057c3164
commit d2675afd6e

@ -1,42 +1,28 @@
#enable/disable tests in case the deps aren't there
%global enable_tests 1
# don't require bundled modules
%global __requires_exclude_from ^%{_prefix}/lib/node_modules/uglify-js@2/.*$
%global __requires_exclude_from ^%{_prefix}/lib/node_modules/uglify-js/.*$
%if 0%{?fedora}
%global installdir %{_jsdir}
%global installdir %{_datadir}/javascript
#enable/disable tests in case the deps aren't there
%bcond_without tests
Name: uglify-js
Version: 2.8.29
Release: 1%{?dist}
Release: 4%{?dist}
Summary: JavaScript parser, mangler/compressor and beautifier toolkit
Group: Development/Tools
License: BSD
#Patch0: uglify-js-esfuzz.patch
BuildArch: noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
Provides: nodejs-uglify-js = %{version}-%{release}
BuildRequires: nodejs-packaging
%if 0%{?fedora}
BuildRequires: nodejs nodejs-packaging
BuildRequires: web-assets-devel
Requires: js-uglify = %{version}-%{release}
@ -52,10 +38,7 @@ Group: System Environment/Libraries
Obsoletes: uglify-js-common < 2.2.5-4
Provides: uglify-js-common = %{version}-%{release}
%if 0%{?fedora}
Requires: web-assets-filesystem
%description -n js-uglify
JavaScript parser, mangler/compressor and beautifier toolkit.
@ -74,9 +57,9 @@ runtime.
rm -rf %buildroot
mkdir -p %{buildroot}%{installdir}/%{name}-2
cp -pr lib/* %{buildroot}%{installdir}/%{name}-2
ln -sf %{name}-2 %{buildroot}%{installdir}/%{name}
mkdir -p %{buildroot}%{_jsdir}/%{name}-2
cp -pr lib/* %{buildroot}%{_jsdir}/%{name}-2
ln -sf %{name}-2 %{buildroot}%{_jsdir}/%{name}
#compat symlink
mkdir -p %{buildroot}%{_datadir}
@ -84,7 +67,7 @@ ln -sf javascript/%{name} %{buildroot}%{_datadir}/%{name}
mkdir -p %{buildroot}%{nodejs_sitelib}/uglify-js@2
cp -pr bin tools package.json node_modules %{buildroot}%{nodejs_sitelib}/uglify-js@2
ln -sf %{installdir}/%{name} %{buildroot}%{nodejs_sitelib}/uglify-js@2/lib
ln -sf %{_jsdir}/%{name} %{buildroot}%{nodejs_sitelib}/uglify-js@2/lib
# Fix for rpmlint.
sed -i -e 's|^#! */usr/bin/env node|#!/usr/bin/node|' \
@ -98,7 +81,7 @@ ln -sf uglify-js@2 %{buildroot}%{nodejs_sitelib}/uglify-js
%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
@ -130,14 +113,27 @@ end
%files -n js-uglify
%license LICENSE
* Wed Jan 22 2020 Jan Staněk <> - 2.8.29-4
- Rebuilt with package tests
* Tue Jan 21 2020 Jan Staněk <> - 2.8.29-3
- Rebuilt with gating enabled
* Tue Jan 21 2020 Jan Staněk <> - 2.8.29-2
- Remove unneeded legacy conditionals around %%{nodejs_arches} and %%{_jsdir}
Resolves: rhbz#1737038
- BuildRequire nodejs for test runs
- Remove reference to non-applied patch
- Use %%bcond_without for conditional compilation
* Wed Jul 25 2018 Zuzana Svetlikova <> - 2.8.29-1
- Update to 2.8.29
- bundle deps, remove all npm modules BR