%{?nodejs_find_provides_and_requires} %global enable_tests 0 Name: nodejs-underscore Version: 1.4.4 Release: 3%{?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 BuildRequires: nodejs-devel %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. %prep %setup -q -n package %setup -T -D -a 1 -q -n package %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/underscore cp -pr package.json index.js underscore.js underscore-min.js \ %{buildroot}%{nodejs_sitelib}/underscore # No dependencies. # %%nodejs_symlink_deps %if 0%{?enable_tests} %check ln -sf %{nodejs_sitelib} . %{nodejs_sitelib}/phantomjs/bin/phantomjs \ test/vendor/runner.js test/index.html?noglobals=true %endif %files %doc CONTRIBUTING.md LICENSE README.md favicon.ico index.html %{nodejs_sitelib}/underscore %changelog * Sat Aug 03 2013 Fedora Release Engineering - 1.4.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Wed Jun 19 2013 T.C. Hollingsworth - 1.4.4-2 - rebuild for missing npm(underscore) provides on EL6 * Wed Feb 13 2013 Jamie Nguyen - 1.4.4-1 - initial package