From 22cd9337527b4e9fd3701d331aa144f22ef08e1e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 19 Jan 2014 11:58:12 +0000 Subject: [PATCH 1/4] use new multi-version packaging rules --- uglify-js.spec | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/uglify-js.spec b/uglify-js.spec index 7ccb2cb..b0e7770 100644 --- a/uglify-js.spec +++ b/uglify-js.spec @@ -5,7 +5,7 @@ Name: uglify-js Version: 2.2.5 -Release: 2%{?dist} +Release: 3%{?dist} Summary: JavaScript parser, mangler/compressor and beautifier toolkit BuildArch: noarch @@ -15,8 +15,10 @@ License: BSD URL: https://github.com/mishoo/UglifyJS2 Source0: http://registry.npmjs.org/uglify-js/-/uglify-js-%{version}.tgz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch -BuildRequires: nodejs-devel +BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(optimist) @@ -55,29 +57,36 @@ rm -rf %buildroot mkdir -p %{buildroot}%{_datadir}/%{name} cp -pr lib/* %{buildroot}%{_datadir}/%{name}/ -mkdir -p %{buildroot}%{nodejs_sitelib}/%{name} -cp -pr bin tools package.json %{buildroot}%{nodejs_sitelib}/%{name} -ln -sf %{_datadir}/%{name} %{buildroot}%{nodejs_sitelib}/%{name}/lib +mkdir -p %{buildroot}%{nodejs_sitelib}/uglify-js@2 +cp -pr bin tools package.json %{buildroot}%{nodejs_sitelib}/uglify-js@2 +ln -sf %{_datadir}/%{name} %{buildroot}%{nodejs_sitelib}/uglify-js@2/lib mkdir -p %{buildroot}%{_bindir} -ln -sf ../lib/node_modules/uglify-js/bin/uglifyjs %{buildroot}%{_bindir}/uglifyjs +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 + %if 0%{?enable_tests} %check -mkdir -p node_modules -ln -sf %{nodejs_sitelib}/source-map node_modules/source-map -ln -sf %{nodejs_sitelib}/optimist node_modules/optimist +%nodejs_symlink_deps --check %__nodejs test/run-tests.js %endif %clean rm -rf %buildroot +%pretrans -p +st = posix.stat("%{nodejs_sitelib}/uglify-js") +if st and st.type == "directory" then + os.execute("rm -rf %{nodejs_sitelib}/uglify-js") +end + %files %defattr(-,root,root,-) -%{nodejs_sitelib}/%{name} +%{nodejs_sitelib}/uglify-js +%{nodejs_sitelib}/uglify-js@2 %{_bindir}/uglifyjs %files common @@ -86,6 +95,10 @@ rm -rf %buildroot %doc README.md %changelog +* Sun Jan 19 2014 Tom Hughes - 2.2.5-3 +- use new multi-version packaging rules +- update to latest nodejs packaging standards + * Sun Aug 04 2013 Fedora Release Engineering - 2.2.5-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild From 8f5c5b41865cd6c04952cb013a2af19168b7900e Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Sun, 19 Jan 2014 17:30:12 -0700 Subject: [PATCH 2/4] port to new JS guidelines - provide the nodejs- form --- uglify-js.spec | 40 ++++++++++++++++++++++++++++++++-------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/uglify-js.spec b/uglify-js.spec index b0e7770..6e2cd0e 100644 --- a/uglify-js.spec +++ b/uglify-js.spec @@ -5,7 +5,7 @@ Name: uglify-js Version: 2.2.5 -Release: 3%{?dist} +Release: 4%{?dist} Summary: JavaScript parser, mangler/compressor and beautifier toolkit BuildArch: noarch @@ -18,14 +18,17 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) 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(optimist) BuildRequires: npm(source-map) %endif -Requires: %{name}-common == %{version}-%{release} +Requires: js-uglify = %{version}-%{release} %description JavaScript parser, mangler/compressor and beautifier toolkit. @@ -33,11 +36,15 @@ 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 common +%package -n js-uglify Summary: JavaScript parser, mangler/compressor and beautifier toolkit - core library Group: System Environment/Libraries -%description common +Obsoletes: uglify-js-common < 2.2.5-4 +Provides: uglify-js-common = %{version}-%{release} +Requires: web-assets-filesystem + +%description -n js-uglify JavaScript parser, mangler/compressor and beautifier toolkit. This package ships a JavaScript library suitable for use by any JavaScript @@ -54,12 +61,17 @@ runtime. %install rm -rf %buildroot -mkdir -p %{buildroot}%{_datadir}/%{name} -cp -pr lib/* %{buildroot}%{_datadir}/%{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} +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 %{_datadir}/%{name} %{buildroot}%{nodejs_sitelib}/uglify-js@2/lib +ln -sf %{_jsdir}/%{name} %{buildroot}%{nodejs_sitelib}/uglify-js@2/lib mkdir -p %{buildroot}%{_bindir} ln -sf ../lib/node_modules/uglify-js@2/bin/uglifyjs %{buildroot}%{_bindir}/uglifyjs @@ -83,18 +95,30 @@ if st and st.type == "directory" then os.execute("rm -rf %{nodejs_sitelib}/uglify-js") end +st = posix.stat("%{_datadir}/%{name}") +if st and st.type == "directory" then + os.execute("rm -rf %{_datadir}/%{name}") +end + %files %defattr(-,root,root,-) %{nodejs_sitelib}/uglify-js %{nodejs_sitelib}/uglify-js@2 %{_bindir}/uglifyjs -%files common +%files -n js-uglify %defattr(-,root,root,-) +%{_jsdir}/%{name}-2 +%{_jsdir}/%{name} %{_datadir}/%{name} %doc README.md + %changelog +* Mon Jan 20 2014 T.C. Hollingsworth - 2.2.5-4 +- port to new JS guidelines +- provide the nodejs- form + * Sun Jan 19 2014 Tom Hughes - 2.2.5-3 - use new multi-version packaging rules - update to latest nodejs packaging standards From 31e6ed8fc256bd86adb7b66cb23de7e4111f2291 Mon Sep 17 00:00:00 2001 From: Jamie Nguyen Date: Wed, 28 Aug 2013 20:09:34 +0100 Subject: [PATCH 3/4] Remove old sources --- sources | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources b/sources index 20cafe2..04072e3 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ -e441026603fbee14a71c9f9fc12d2143 uglify-js-2.2.3.tgz -f9c8d82dadbe4cb8d455501dae7a2fc9 uglify-js-2.2.4.tgz 67f3a14cec7b24e62f79689a16408a97 uglify-js-2.2.5.tgz From b679f9b31ac769d867e9da93368dacddb7f75a22 Mon Sep 17 00:00:00 2001 From: Jamie Nguyen Date: Sat, 15 Mar 2014 15:29:47 +0000 Subject: [PATCH 4/4] Update to upstream release 2.4.13 --- .gitignore | 1 + sources | 2 +- uglify-js.spec | 10 +++++++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 7bc546a..5d76d78 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /uglify-js-2.2.3.tgz /uglify-js-2.2.4.tgz /uglify-js-2.2.5.tgz +/uglify-js-2.4.13.tgz diff --git a/sources b/sources index 04072e3..37edd86 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -67f3a14cec7b24e62f79689a16408a97 uglify-js-2.2.5.tgz +e9cce2a24532872a1f6816145d65c414 uglify-js-2.4.13.tgz diff --git a/uglify-js.spec b/uglify-js.spec index 6e2cd0e..52b7705 100644 --- a/uglify-js.spec +++ b/uglify-js.spec @@ -4,8 +4,8 @@ %global enable_tests 1 Name: uglify-js -Version: 2.2.5 -Release: 4%{?dist} +Version: 2.4.13 +Release: 1%{?dist} Summary: JavaScript parser, mangler/compressor and beautifier toolkit BuildArch: noarch @@ -24,6 +24,7 @@ BuildRequires: nodejs-packaging BuildRequires: web-assets-devel %if 0%{?enable_tests} +BuildRequires: npm(async) BuildRequires: npm(optimist) BuildRequires: npm(source-map) %endif @@ -111,10 +112,13 @@ end %{_jsdir}/%{name}-2 %{_jsdir}/%{name} %{_datadir}/%{name} -%doc README.md +%doc LICENSE README.md %changelog +* Thu Mar 13 2014 Jamie Nguyen - 2.4.13-1 +- update to upstream release 2.4.13 + * Mon Jan 20 2014 T.C. Hollingsworth - 2.2.5-4 - port to new JS guidelines - provide the nodejs- form