You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
uglify-js/uglify-js.spec

225 lines
6.3 KiB

%{?nodejs_find_provides_and_requires}
12 years ago
#enable/disable tests in case the deps aren't there
12 years ago
%global enable_tests 1
12 years ago
%if 0%{?fedora}
%global installdir %{_jsdir}
%else
%global installdir %{_datadir}/javascript
%endif
12 years ago
Name: uglify-js
Version: 2.7.0
Release: 1%{?dist}
12 years ago
Summary: JavaScript parser, mangler/compressor and beautifier toolkit
BuildArch: noarch
Group: Development/Tools
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
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif
12 years ago
Provides: nodejs-uglify-js = %{version}-%{release}
BuildRequires: nodejs-packaging
%if 0%{?fedora}
BuildRequires: web-assets-devel
%endif
12 years ago
%if 0%{?enable_tests}
BuildRequires: npm(async)
BuildRequires: npm(mocha)
12 years ago
BuildRequires: npm(optimist)
BuildRequires: npm(source-map)
%endif
Requires: js-uglify = %{version}-%{release}
12 years ago
%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
12 years ago
Summary: JavaScript parser, mangler/compressor and beautifier toolkit - core library
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
12 years ago
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}
12 years ago
%nodejs_fixdep async "^1.5.0"
%nodejs_fixdep yargs "^3.2.1"
12 years ago
%build
#nothing to do
12 years ago
%install
rm -rf %buildroot
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}
ln -sf javascript/%{name} %{buildroot}%{_datadir}/%{name}
12 years ago
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
12 years ago
mkdir -p %{buildroot}%{_bindir}
ln -sf ../lib/node_modules/uglify-js@2/bin/uglifyjs %{buildroot}%{_bindir}/uglifyjs
12 years ago
%nodejs_symlink_deps
12 years ago
ln -sf uglify-js@2 %{buildroot}%{nodejs_sitelib}/uglify-js
12 years ago
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
12 years ago
%__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
12 years ago
%files
%defattr(-,root,root,-)
%{nodejs_sitelib}/uglify-js
%{nodejs_sitelib}/uglify-js@2
12 years ago
%{_bindir}/uglifyjs
%files -n js-uglify
12 years ago
%defattr(-,root,root,-)
%{installdir}/%{name}-2
%{installdir}/%{name}
12 years ago
%{_datadir}/%{name}
%doc README.md
%license LICENSE
12 years ago
12 years ago
%changelog
* Thu Jul 28 2016 Jared Smith <jsmith@fedoraproject.org> - 2.7.0-1
- Update to upstream 2.7.0 release
* Sat Jul 09 2016 Jared Smith <jsmith@fedoraproject.org> - 2.6.4-1
- Update to upstream 2.6.4 release
* Wed Feb 10 2016 Tom Hughes <tom@compton.nu> - 2.6.1-1
- Update to 2.6.1 upstream release
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.13-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sat Nov 21 2015 Tom Hughes <tom@compton.nu> - 2.4.13-8
- update async dependency
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.13-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.13-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu May 08 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 2.4.13-5
- add logic for building on EL6
* Tue Apr 29 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 2.4.13-4
- pretrans script should actually be split in two, so one half should run in
uglify-js and the other half should run in js-uglify (#1092184)
* Tue Apr 01 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 2.4.13-3
- pretrans script should run in js-uglify subpackage (#1082946)
* 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
* 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
* Tue Apr 16 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.2.5-1
- new upstream release 2.2.5
* Tue Apr 16 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.2.4-3
- call nodejs_symlink_deps
- fix optimist dep for 0.4.0
12 years ago
* Wed Feb 13 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.2.4-2
- install tools dir
12 years ago
- enable tests
12 years ago
* Wed Feb 13 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.2.4-1
- new upstream release 2.2.4
12 years ago
* Fri Feb 01 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.2.3-6
- rearrange symlinks so dep generator works
* Fri Feb 01 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.2.3-5
- really fix install section
- conditionalize tests
* Thu Jan 31 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.2.3-4
- fix install section
* Thu Jan 31 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.2.3-3
- split off -common subpackage for use with other runtimes
* Fri Jan 18 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.2.3-2
- BuildRequire deps so tests work
* Tue Jan 08 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 2.2.3-1
- initial package generated by npm2rpm