|
|
|
@ -3,9 +3,15 @@
|
|
|
|
|
#enable/disable tests in case the deps aren't there
|
|
|
|
|
%global enable_tests 1
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
|
%global installdir %{_jsdir}
|
|
|
|
|
%else
|
|
|
|
|
%global installdir %{_datadir}/javascript
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
Name: uglify-js
|
|
|
|
|
Version: 2.4.13
|
|
|
|
|
Release: 1%{?dist}
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Summary: JavaScript parser, mangler/compressor and beautifier toolkit
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
@ -21,7 +27,10 @@ ExclusiveArch: %{nodejs_arches} noarch
|
|
|
|
|
Provides: nodejs-uglify-js = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
BuildRequires: nodejs-packaging
|
|
|
|
|
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
|
BuildRequires: web-assets-devel
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
BuildRequires: npm(async)
|
|
|
|
@ -43,7 +52,10 @@ Group: System Environment/Libraries
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
@ -62,9 +74,9 @@ runtime.
|
|
|
|
|
%install
|
|
|
|
|
rm -rf %buildroot
|
|
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_jsdir}/%{name}-2
|
|
|
|
|
cp -pr lib/* %{buildroot}%{_jsdir}/%{name}-2
|
|
|
|
|
ln -sf %{name}-2 %{buildroot}%{_jsdir}/%{name}
|
|
|
|
|
mkdir -p %{buildroot}%{installdir}/%{name}-2
|
|
|
|
|
cp -pr lib/* %{buildroot}%{installdir}/%{name}-2
|
|
|
|
|
ln -sf %{name}-2 %{buildroot}%{installdir}/%{name}
|
|
|
|
|
|
|
|
|
|
#compat symlink
|
|
|
|
|
mkdir -p %{buildroot}%{_datadir}
|
|
|
|
@ -72,7 +84,7 @@ 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
|
|
|
|
|
ln -sf %{installdir}/%{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
|
|
|
|
@ -109,13 +121,17 @@ end
|
|
|
|
|
|
|
|
|
|
%files -n js-uglify
|
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
|
%{_jsdir}/%{name}-2
|
|
|
|
|
%{_jsdir}/%{name}
|
|
|
|
|
%{installdir}/%{name}-2
|
|
|
|
|
%{installdir}/%{name}
|
|
|
|
|
%{_datadir}/%{name}
|
|
|
|
|
%doc LICENSE README.md
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Sat Mar 15 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 2.4.13-2
|
|
|
|
|
- add logic for building on EPEL 6 as web-assets-{devel,filesystem} are not
|
|
|
|
|
yet available
|
|
|
|
|
|
|
|
|
|
* Thu Mar 13 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 2.4.13-1
|
|
|
|
|
- update to upstream release 2.4.13
|
|
|
|
|
|
|
|
|
|