package init
This commit is contained in:
parent
3ba603c975
commit
2b8b2843db
BIN
uglify-js-2.8.22.tar.gz
Normal file
BIN
uglify-js-2.8.22.tar.gz
Normal file
Binary file not shown.
23
uglify-js-esfuzz.patch
Normal file
23
uglify-js-esfuzz.patch
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
commit 2c6570391beeda550f86500e3f7c6eaa992a05b7
|
||||||
|
Author: Tom Hughes <tom@compton.nu>
|
||||||
|
Date: Wed Feb 10 18:16:53 2016 +0000
|
||||||
|
|
||||||
|
Patch out tests that require esfuzz
|
||||||
|
|
||||||
|
diff --git a/test/run-tests.js b/test/run-tests.js
|
||||||
|
index 3ec04fd..96c0613 100755
|
||||||
|
--- a/test/run-tests.js
|
||||||
|
+++ b/test/run-tests.js
|
||||||
|
@@ -19,12 +19,6 @@ if (failures) {
|
||||||
|
var run_sourcemaps_tests = require('./sourcemaps');
|
||||||
|
run_sourcemaps_tests();
|
||||||
|
|
||||||
|
-var run_ast_conversion_tests = require("./mozilla-ast");
|
||||||
|
-
|
||||||
|
-run_ast_conversion_tests({
|
||||||
|
- iterations: 1000
|
||||||
|
-});
|
||||||
|
-
|
||||||
|
/* -----[ utils ]----- */
|
||||||
|
|
||||||
|
function tmpl() {
|
||||||
98
uglify-js.spec
Normal file
98
uglify-js.spec
Normal file
@ -0,0 +1,98 @@
|
|||||||
|
%{?nodejs_find_provides_and_requires}
|
||||||
|
%global enable_tests 1
|
||||||
|
%global installdir %{_jsdir}
|
||||||
|
Name: uglify-js
|
||||||
|
Version: 2.8.22
|
||||||
|
Release: 1
|
||||||
|
Summary: JavaScript parser, mangler/compressor and beautifier toolkit
|
||||||
|
License: BSD
|
||||||
|
URL: https://github.com/mishoo/UglifyJS2
|
||||||
|
Source0: https://github.com/mishoo/UglifyJS2/archive/v%{version}/uglify-js-%{version}.tar.gz
|
||||||
|
Patch0: uglify-js-esfuzz.patch
|
||||||
|
BuildArch: noarch
|
||||||
|
ExclusiveArch: %{nodejs_arches} noarch
|
||||||
|
Provides: nodejs-uglify-js = %{version}-%{release}
|
||||||
|
BuildRequires: nodejs-packaging
|
||||||
|
BuildRequires: web-assets-devel
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
BuildRequires: npm(acorn) npm(async) npm(mocha) npm(optimist) npm(source-map)
|
||||||
|
%endif
|
||||||
|
Requires: js-uglify = %{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-uglify
|
||||||
|
Summary: JavaScript parser, mangler/compressor and beautifier toolkit - core library
|
||||||
|
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.
|
||||||
|
This package ships a JavaScript library suitable for use by any JavaScript
|
||||||
|
runtime.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -p 1 -n UglifyJS2-%{version}
|
||||||
|
%nodejs_fixdep async "^1.5.0"
|
||||||
|
%nodejs_fixdep yargs "^3.2.1"
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%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}%{_datadir}
|
||||||
|
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
|
||||||
|
sed -i -e 's|^#! */usr/bin/env node|#!/usr/bin/node|' \
|
||||||
|
%{buildroot}%{nodejs_sitelib}/uglify-js@2/bin/*
|
||||||
|
mkdir -p %{buildroot}%{_bindir}
|
||||||
|
ln -sf ../lib/node_modules/uglify-js@2/bin/uglifyjs %{buildroot}%{_bindir}/uglifyjs
|
||||||
|
%nodejs_symlink_deps
|
||||||
|
ln -sf uglify-js@2 %{buildroot}%{nodejs_sitelib}/uglify-js
|
||||||
|
|
||||||
|
%check
|
||||||
|
%nodejs_symlink_deps --check
|
||||||
|
%{__nodejs} -e 'require("./")'
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
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
|
||||||
|
%__nodejs test/run-tests.js
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%pretrans -p <lua>
|
||||||
|
st = posix.stat("%{nodejs_sitelib}/uglify-js")
|
||||||
|
if st and st.type == "directory" then
|
||||||
|
os.execute("rm -rf %{nodejs_sitelib}/uglify-js")
|
||||||
|
end
|
||||||
|
|
||||||
|
%pretrans -n js-uglify -p <lua>
|
||||||
|
st = posix.stat("%{_datadir}/%{name}")
|
||||||
|
if st and st.type == "directory" then
|
||||||
|
os.execute("rm -rf %{_datadir}/%{name}")
|
||||||
|
end
|
||||||
|
|
||||||
|
%files
|
||||||
|
%{nodejs_sitelib}/uglify-js
|
||||||
|
%{nodejs_sitelib}/uglify-js@2
|
||||||
|
%{_bindir}/uglifyjs
|
||||||
|
|
||||||
|
%files -n js-uglify
|
||||||
|
%{installdir}/%{name}-2
|
||||||
|
%{installdir}/%{name}
|
||||||
|
%{_datadir}/%{name}
|
||||||
|
%doc README.md
|
||||||
|
%license LICENSE
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Mon Aug 24 2020 wangyue <wangyue92@huawei.com> - 2.8.22-1
|
||||||
|
- package init
|
||||||
5
uglify-js.yaml
Normal file
5
uglify-js.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
git_url: https://github.com/mishoo/UglifyJS2
|
||||||
|
version_control: github
|
||||||
|
src_repo: mishoo/UglifyJS2
|
||||||
|
tag_prefix: "^v"
|
||||||
|
seperator: "."
|
||||||
Loading…
x
Reference in New Issue
Block a user