Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global enable_tests 1

Name:       nodejs-reduce-component
Version:    1.0.1
Release:    1%{?dist}
Summary:    An array reduce component for Node.js
License:    ASL 2.0
Group:      System Environment/Libraries
URL:        https://github.com/redventures/reduce
Source0:    http://registry.npmjs.org/reduce-component/-/reduce-component-%{version}.tgz

BuildArch:  noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires:  mocha
BuildRequires:  npm(should)
%endif

%description
%{summary}.


%prep
%setup -q -n package


%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/reduce-component
cp -pr package.json index.js \
    %{buildroot}%{nodejs_sitelib}/reduce-component

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
/usr/bin/mocha --require should --reporter spec
%endif


%files
%doc LICENSE Readme.md
%{nodejs_sitelib}/reduce-component


%changelog
* Sat Mar 08 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.0.1-1
- initial package