From caeab3cb1f39b90bc5036824f523e117e22713a6 Mon Sep 17 00:00:00 2001 From: "T.C. Hollingsworth" Date: Tue, 12 Feb 2013 18:38:36 -0700 Subject: [PATCH] initial import --- .gitignore | 1 + sources | 1 + uglify-js.spec | 100 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 uglify-js.spec diff --git a/.gitignore b/.gitignore index e69de29..b89c472 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/uglify-js-2.2.3.tgz diff --git a/sources b/sources index e69de29..130b0bf 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +e441026603fbee14a71c9f9fc12d2143 uglify-js-2.2.3.tgz diff --git a/uglify-js.spec b/uglify-js.spec new file mode 100644 index 0000000..dd99f7f --- /dev/null +++ b/uglify-js.spec @@ -0,0 +1,100 @@ +#enable/disable tests in case the deps aren't there +%global enable_tests 0 + +Name: uglify-js +Version: 2.2.3 +Release: 6%{?dist} +Summary: JavaScript parser, mangler/compressor and beautifier toolkit +BuildArch: noarch + +Group: Development/Tools +#no license file included; BSD license in source header +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) + +BuildRequires: nodejs-devel + +%if 0%{?enable_tests} +BuildRequires: npm(optimist) +BuildRequires: npm(source-map) +%endif + +Requires: %{name}-common == %{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 common +Summary: JavaScript parser, mangler/compressor and beautifier toolkit - core library +Group: System Environment/Libraries + +%description common +JavaScript parser, mangler/compressor and beautifier toolkit. + +This package ships a JavaScript library suitable for use by any JavaScript +runtime. + +%prep +%setup -q -n package + +%build +#nothing to do + +%install +rm -rf %buildroot + +mkdir -p %{buildroot}%{_datadir}/%{name} +cp -pr lib/* %{buildroot}%{_datadir}/%{name}/ + +mkdir -p %{buildroot}%{nodejs_sitelib}/%{name} +cp -pr bin package.json %{buildroot}%{nodejs_sitelib}/%{name} +ln -sf %{_datadir}/%{name} %{buildroot}%{nodejs_sitelib}/%{name}/lib + +mkdir -p %{buildroot}%{_bindir} +ln -sf ../lib/node_modules/uglify-js/bin/uglifyjs %{buildroot}%{_bindir}/uglifyjs + +#nodejs-symlink-deps is not called because this package does not have any +#dependencies and can be used outside of node + +%if 0%{?enable_tests} +%check +%__nodejs test/run-tests.js +%endif + +%clean +rm -rf %buildroot + +%files +%defattr(-,root,root,-) +%{nodejs_sitelib}/%{name} +%{_bindir}/uglifyjs + +%files common +%defattr(-,root,root,-) +%{_datadir}/%{name} +%doc README.md + +%changelog +* Fri Feb 01 2013 T.C. Hollingsworth - 2.2.3-6 +- rearrange symlinks so dep generator works + +* Fri Feb 01 2013 T.C. Hollingsworth - 2.2.3-5 +- really fix install section +- conditionalize tests + +* Thu Jan 31 2013 T.C. Hollingsworth - 2.2.3-4 +- fix install section + +* Thu Jan 31 2013 T.C. Hollingsworth - 2.2.3-3 +- split off -common subpackage for use with other runtimes + +* Fri Jan 18 2013 T.C. Hollingsworth - 2.2.3-2 +- BuildRequire deps so tests work + +* Tue Jan 08 2013 T.C. Hollingsworth - 2.2.3-1 +- initial package generated by npm2rpm