From 75b5f018a9a8c0ca63f08534ffc74eae00f776ae Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Mon, 16 Aug 2021 21:29:07 +0200 Subject: [PATCH 1/3] Parallel installable uglify-js version 3 for EPEL --- .gitignore | 1 + sources | 1 + uglify-js3.spec | 101 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 103 insertions(+) create mode 100644 .gitignore create mode 100644 sources create mode 100644 uglify-js3.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..17d6b36 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/*.tgz diff --git a/sources b/sources new file mode 100644 index 0000000..e78d095 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (uglify-js-3.14.1.tgz) = 2614b7866715697969ff14a8dcf298e51d09a8ab39337215f9ec5d2c75bdf6a2af2a2bcf3b867ca9b7a3ea6b5ed7b48e3ea00e54c8edfd71a059a727152cccde diff --git a/uglify-js3.spec b/uglify-js3.spec new file mode 100644 index 0000000..fb77549 --- /dev/null +++ b/uglify-js3.spec @@ -0,0 +1,101 @@ +%{?nodejs_find_provides_and_requires} + +#enable/disable tests in case the deps aren't there +%bcond_with tests + +%define oname uglify-js + +Name: uglify-js3 +Version: 3.14.1 +Release: 1%{?dist} +Summary: JavaScript parser, mangler/compressor and beautifier toolkit +License: BSD +URL: https://github.com/mishoo/UglifyJS +Source0: http://registry.npmjs.org/%{oname}/-/%{oname}-%{version}.tgz + +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch + +Provides: nodejs-uglify-js3 = %{version}-%{release} + +BuildRequires: nodejs +BuildRequires: nodejs-packaging +BuildRequires: web-assets-devel + +%if %{with tests} +BuildRequires: npm(acorn) +BuildRequires: npm(semver) +%endif + +Requires: js-uglify3 = %{version}-%{release} + +%description +JavaScript parser, mangler/compressor and beautifier toolkit. + +This package ships the uglifyjs command-line tool and a library suitable for +use within Node.js. + +%package -n js-uglify3 +Summary: JavaScript parser, mangler/compressor and beautifier toolkit - core library + +Requires: web-assets-filesystem + +%description -n js-uglify3 +JavaScript parser, mangler/compressor and beautifier toolkit. + +This package ships a JavaScript library suitable for use by any JavaScript +runtime. + +%prep +%autosetup -n package + +chmod 0755 bin/uglifyjs + +%build +#nothing to do + + +%install +mkdir -p %{buildroot}%{_jsdir}/%{oname}-3 +cp -pr lib/* %{buildroot}%{_jsdir}/%{oname}-3 + +mkdir -p %{buildroot}%{nodejs_sitelib}/uglify-js@3 +cp -pr bin tools package.json %{buildroot}%{nodejs_sitelib}/uglify-js@3 +ln -sf %{_jsdir}/%{oname}-3 %{buildroot}%{nodejs_sitelib}/uglify-js@3/lib +# Fix for rpmlint. +sed -i -e 's|^#! */usr/bin/env node|#!/usr/bin/node|' \ + %{buildroot}%{nodejs_sitelib}/uglify-js@3/bin/* +chmod 755 %{buildroot}%{nodejs_sitelib}/uglify-js@3/bin/uglifyjs + +mkdir -p %{buildroot}%{_bindir} +ln -sf ../lib/node_modules/uglify-js@3/bin/uglifyjs %{buildroot}%{_bindir}/uglifyjs-3 + +%nodejs_symlink_deps + + +%check +%nodejs_symlink_deps --check +%{__nodejs} -e 'require("./")' +%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 +sed -i '/timeout/ s/20000/40000/' test/mocha/spidermonkey.js +NODE_DISABLE_COLORS=true %{__nodejs} test/run-tests.js +%endif + + +%files +%{nodejs_sitelib}/uglify-js@3 +%{_bindir}/uglifyjs-3 + + +%files -n js-uglify3 +%{_jsdir}/%{oname}-3 +%doc README.md +%license LICENSE + + +%changelog +* Mon Aug 16 2021 Mattias Ellert - 3.14.1-1 +- Parallel installable uglify-js version 3 for EPEL From 6b02025cd244b3315f896ee419901b896750aebd Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Thu, 14 Oct 2021 14:05:04 +0200 Subject: [PATCH 2/3] Update to 3.14.2 --- sources | 2 +- uglify-js3.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index e78d095..7d92eed 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (uglify-js-3.14.1.tgz) = 2614b7866715697969ff14a8dcf298e51d09a8ab39337215f9ec5d2c75bdf6a2af2a2bcf3b867ca9b7a3ea6b5ed7b48e3ea00e54c8edfd71a059a727152cccde +SHA512 (uglify-js-3.14.2.tgz) = aed3cc96670ee1a81351fcf5d026e027593a500a173368166f71a830f3d907ffbf01c91ff25356935d4ae2b622d83d1aa60a0544bb5039985bfbf886349ab6e8 diff --git a/uglify-js3.spec b/uglify-js3.spec index fb77549..7766e01 100644 --- a/uglify-js3.spec +++ b/uglify-js3.spec @@ -6,7 +6,7 @@ %define oname uglify-js Name: uglify-js3 -Version: 3.14.1 +Version: 3.14.2 Release: 1%{?dist} Summary: JavaScript parser, mangler/compressor and beautifier toolkit License: BSD @@ -97,5 +97,8 @@ NODE_DISABLE_COLORS=true %{__nodejs} test/run-tests.js %changelog +* Thu Oct 14 2021 Mattias Ellert - 3.14.2-1 +- Update to 3.14.2 + * Mon Aug 16 2021 Mattias Ellert - 3.14.1-1 - Parallel installable uglify-js version 3 for EPEL From 73e1eda737b9baf8efb0154b0e95680df3167c66 Mon Sep 17 00:00:00 2001 From: Mattias Ellert Date: Tue, 2 Nov 2021 21:58:15 +0100 Subject: [PATCH 3/3] Update to 3.14.3 --- sources | 2 +- uglify-js3.spec | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sources b/sources index 7d92eed..d9406ac 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (uglify-js-3.14.2.tgz) = aed3cc96670ee1a81351fcf5d026e027593a500a173368166f71a830f3d907ffbf01c91ff25356935d4ae2b622d83d1aa60a0544bb5039985bfbf886349ab6e8 +SHA512 (uglify-js-3.14.3.tgz) = 9a273768e762ab4d43b92571d13b1e684ccc215a9e6cc674677bda783845121f5bb1cdb8855d5316f37be2b780dafb34f03d1959f36301c27751b54b681b2cfa diff --git a/uglify-js3.spec b/uglify-js3.spec index 7766e01..7c024cd 100644 --- a/uglify-js3.spec +++ b/uglify-js3.spec @@ -6,7 +6,7 @@ %define oname uglify-js Name: uglify-js3 -Version: 3.14.2 +Version: 3.14.3 Release: 1%{?dist} Summary: JavaScript parser, mangler/compressor and beautifier toolkit License: BSD @@ -97,6 +97,9 @@ NODE_DISABLE_COLORS=true %{__nodejs} test/run-tests.js %changelog +* Tue Nov 02 2021 Mattias Ellert - 3.14.3-1 +- Update to 3.14.3 + * Thu Oct 14 2021 Mattias Ellert - 3.14.2-1 - Update to 3.14.2