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.
nodejs-underscore/nodejs-underscore.spec

69 lines
1.7 KiB

%{?nodejs_find_provides_and_requires}
12 years ago
%global enable_tests 0
Name: nodejs-underscore
Version: 1.4.4
Release: 2%{?dist}
12 years ago
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} .
12 years ago
%{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
* Wed Jun 19 2013 T.C. Hollingsworth <tchollingsworth@gmail.com> - 1.4.4-2
- rebuild for missing npm(underscore) provides on EL6
12 years ago
* Wed Feb 13 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.4.4-1
- initial package