Merge branch 'master' into f20

Conflicts:
	sources
epel9
Jamie Nguyen 11 years ago
commit 949460576a

1
.gitignore vendored

@ -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

@ -1 +1 @@
67f3a14cec7b24e62f79689a16408a97 uglify-js-2.2.5.tgz
e9cce2a24532872a1f6816145d65c414 uglify-js-2.4.13.tgz

@ -4,8 +4,8 @@
%global enable_tests 1
Name: uglify-js
Version: 2.2.5
Release: 2%{?dist}
Version: 2.4.13
Release: 1%{?dist}
Summary: JavaScript parser, mangler/compressor and beautifier toolkit
BuildArch: noarch
@ -15,15 +15,21 @@ 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
Provides: nodejs-uglify-js = %{version}-%{release}
BuildRequires: nodejs-devel
BuildRequires: nodejs-packaging
BuildRequires: web-assets-devel
%if 0%{?enable_tests}
BuildRequires: npm(async)
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.
@ -31,11 +37,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
@ -52,40 +62,71 @@ 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}
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
#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 %{_jsdir}/%{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 <lua>
st = posix.stat("%{nodejs_sitelib}/uglify-js")
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}/%{name}
%{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
%doc LICENSE README.md
%changelog
* Thu Mar 13 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 2.4.13-1
- update to upstream release 2.4.13
* Mon Jan 20 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.2.5-4
- port to new JS guidelines
- provide the nodejs- form
* Sun Jan 19 2014 Tom Hughes <tom@compton.nu> - 2.2.5-3
- use new multi-version packaging rules
- update to latest nodejs packaging standards
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

Loading…
Cancel
Save