|
|
|
%{?nodejs_find_provides_and_requires}
|
|
|
|
|
|
|
|
# NOTE TO SELF: Do not update on Fedora <= 20.
|
|
|
|
|
|
|
|
%global enable_tests 0
|
|
|
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
%global installdir %{_jsdir}/underscore
|
|
|
|
%else
|
|
|
|
%global installdir %{_datadir}/javascript/underscore
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Name: nodejs-underscore
|
|
|
|
Version: 1.6.0
|
|
|
|
Release: 5%{?dist}
|
|
|
|
Summary: JavaScript's functional programming helper library
|
|
|
|
License: MIT
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
URL: https://github.com/documentcloud/underscore
|
|
|
|
Source0: http://registry.npmjs.org/underscore/-/underscore-%{version}.tgz
|
|
|
|
# The test files are not included in the npm tarball.
|
|
|
|
# Source1 is generated by running Source10, which pulls from the upstream
|
|
|
|
# version control repository.
|
|
|
|
Source1: tests-%{version}.tar.bz2
|
|
|
|
Source10: dl-tests.sh
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
%if 0%{?fedora} >= 19
|
|
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
|
|
%else
|
|
|
|
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
BuildRequires: web-assets-devel
|
|
|
|
%endif
|
|
|
|
|
|
|
|
BuildRequires: nodejs-packaging
|
|
|
|
BuildRequires: uglify-js
|
|
|
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
BuildRequires: npm(phantomjs)
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description
|
|
|
|
Underscore.js is a utility-belt library for JavaScript that provides support
|
|
|
|
for the usual functional suspects (each, map, reduce, filter...) without
|
|
|
|
extending any core JavaScript objects.
|
|
|
|
|
|
|
|
%package -n js-underscore
|
|
|
|
Summary: JavaScript's functional programming helper library
|
|
|
|
Group: System Environment/Libraries
|
|
|
|
%if 0%{?fedora}
|
|
|
|
Requires: web-assets-filesystem
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%description -n js-underscore
|
|
|
|
Underscore.js is a utility-belt library for JavaScript that provides support
|
|
|
|
for the usual functional suspects (each, map, reduce, filter...) without
|
|
|
|
extending any core JavaScript objects.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n package
|
|
|
|
%setup -T -D -a 1 -q -n package
|
|
|
|
rm -f underscore-min.*
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
/usr/bin/uglifyjs underscore.js -m --source-map underscore-min.map \
|
|
|
|
-o underscore-min.js
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/underscore
|
|
|
|
cp -pr package.json underscore.js underscore-min.js underscore-min.map \
|
|
|
|
%{buildroot}%{nodejs_sitelib}/underscore
|
|
|
|
|
|
|
|
# Install browser version
|
|
|
|
mkdir -p %{buildroot}%{installdir}
|
|
|
|
cp -pr underscore.js underscore-min.js underscore-min.map \
|
|
|
|
%{buildroot}%{installdir}
|
|
|
|
|
|
|
|
# No dependencies.
|
|
|
|
# %%nodejs_symlink_deps
|
|
|
|
|
|
|
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
%check
|
|
|
|
%nodejs_symlink_deps --check
|
|
|
|
%{nodejs_sitelib}/phantomjs/bin/phantomjs \
|
|
|
|
test/vendor/runner.js test/index.html?noglobals=true
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%doc LICENSE README.md
|
|
|
|
%{nodejs_sitelib}/underscore
|
|
|
|
|
|
|
|
%files -n js-underscore
|
|
|
|
%doc LICENSE README.md
|
|
|
|
%{installdir}
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.0-5
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
|
|
|
|
|
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.6.0-4
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
|
|
|
|
|
* Thu May 08 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.6.0-3
|
|
|
|
- depend explicitly on latest version of uglifyjs
|
|
|
|
|
|
|
|
* Sat Apr 26 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.6.0-2
|
|
|
|
- add jsdir logic for EL6
|
|
|
|
|
|
|
|
* Fri Apr 18 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.6.0-1
|
|
|
|
- update to upstream release 1.6.0
|
|
|
|
|
|
|
|
* Sun Jan 19 2014 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.5.1-2
|
|
|
|
- ship a browser version
|
|
|
|
- add missing BuildRequires on uglify-js
|
|
|
|
- remove no longer present documentation files
|
|
|
|
|
|
|
|
* Sun Aug 18 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.5.1-1
|
|
|
|
- update to upstream release 1.5.1
|
|
|
|
- remove pre-compiled JS and use uglifyjs to compile
|
|
|
|
|
|
|
|
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4.4-3
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
|
|
|
|
|
* Wed Jun 19 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.4.4-2
|
|
|
|
- rebuild for missing npm(underscore) provides on EL6
|
|
|
|
|
|
|
|
* Wed Feb 13 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.4.4-1
|
|
|
|
- initial package
|