|
|
|
@ -3,15 +3,9 @@
|
|
|
|
|
#enable/disable tests in case the deps aren't there
|
|
|
|
|
%global enable_tests 1
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
|
%global installdir %{_jsdir}
|
|
|
|
|
%else
|
|
|
|
|
%global installdir %{_datadir}/javascript
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Name: uglify-js
|
|
|
|
|
Version: 2.8.22
|
|
|
|
|
Release: 7%{?dist}
|
|
|
|
|
Release: 8%{?dist}
|
|
|
|
|
Summary: JavaScript parser, mangler/compressor and beautifier toolkit
|
|
|
|
|
License: BSD
|
|
|
|
|
URL: https://github.com/mishoo/UglifyJS2
|
|
|
|
@ -19,19 +13,12 @@ Source0: https://github.com/mishoo/UglifyJS2/archive/v%{version}/uglify-j
|
|
|
|
|
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: web-assets-devel
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
BuildRequires: npm(acorn)
|
|
|
|
@ -79,9 +66,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}
|
|
|
|
@ -89,7 +76,7 @@ ln -sf javascript/%{name} %{buildroot}%{_datadir}/%{name}
|
|
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/uglify-js@2
|
|
|
|
|
cp -pr bin tools package.json %{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/*
|
|
|
|
@ -135,14 +122,17 @@ end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n js-uglify
|
|
|
|
|
%{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.22-8
|
|
|
|
|
- Remove unneeded legacy conditionals around %%{nodejs_arches} and %%{_jsdir}
|
|
|
|
|
|
|
|
|
|
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.22-7
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|