import uglify-js-2.8.29-4.el8
This commit is contained in:
parent
8f057c3164
commit
d2675afd6e
@ -1,42 +1,28 @@
|
||||
%{?nodejs_find_provides_and_requires}
|
||||
|
||||
#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}
|
||||
%else
|
||||
%global installdir %{_datadir}/javascript
|
||||
%endif
|
||||
#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
|
||||
URL: https://github.com/mishoo/UglifyJS2
|
||||
Source0: https://github.com/mishoo/UglifyJS2/archive/v%{version}/uglify-js-v%{version}.tar.gz
|
||||
#Patch0: uglify-js-esfuzz.patch
|
||||
|
||||
BuildArch: noarch
|
||||
%if 0%{?fedora} >= 19
|
||||
ExclusiveArch: %{nodejs_arches} noarch
|
||||
%else
|
||||
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
||||
%endif
|
||||
|
||||
Provides: nodejs-uglify-js = %{version}-%{release}
|
||||
|
||||
BuildRequires: nodejs-packaging
|
||||
|
||||
%if 0%{?fedora}
|
||||
BuildRequires: nodejs nodejs-packaging
|
||||
BuildRequires: web-assets-devel
|
||||
%endif
|
||||
|
||||
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
|
||||
%endif
|
||||
|
||||
%description -n js-uglify
|
||||
JavaScript parser, mangler/compressor and beautifier toolkit.
|
||||
@ -74,9 +57,9 @@ runtime.
|
||||
%install
|
||||
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|' \
|
||||
%{buildroot}%{nodejs_sitelib}/uglify-js@2/bin/*
|
||||
@ -98,7 +81,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
|
||||
@ -130,14 +113,27 @@ end
|
||||
|
||||
%files -n js-uglify
|
||||
%defattr(-,root,root,-)
|
||||
%{installdir}/%{name}-2
|
||||
%{installdir}/%{name}
|
||||
%{_jsdir}/%{name}-2
|
||||
%{_jsdir}/%{name}
|
||||
%{_datadir}/%{name}
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jan 22 2020 Jan Staněk <jstanek@redhat.com> - 2.8.29-4
|
||||
- Rebuilt with package tests
|
||||
|
||||
* Tue Jan 21 2020 Jan Staněk <jstanek@redhat.com> - 2.8.29-3
|
||||
- Rebuilt with gating enabled
|
||||
|
||||
* Tue Jan 21 2020 Jan Staněk <jstanek@redhat.com> - 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 <zsvetlik@redhat.com> - 2.8.29-1
|
||||
- Update to 2.8.29
|
||||
- bundle deps, remove all npm modules BR
|
||||
|
Loading…
Reference in New Issue
Block a user