%{?nodejs_find_provides_and_requires} %global packagename tap-mocha-reporter %global enable_tests 1 Name: nodejs-tap-mocha-reporter Version: 0.0.22 Release: 3%{?dist} Summary: Format a TAP stream using Mocha's set of reporters License: ISC and MIT URL: https://github.com/isaacs/tap-mocha-reporter.git Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # The test depends on a *really* old version of tap, and can easily be # re-written to use the new tap syntax Patch0: tap-mocha-reporter_fix-test.patch ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(debug) BuildRequires: npm(diff) BuildRequires: npm(escape-string-regexp) BuildRequires: npm(glob) BuildRequires: npm(js-yaml) BuildRequires: npm(supports-color) BuildRequires: npm(tap) BuildRequires: npm(tap-parser) BuildRequires: npm(unicode-length) %endif %description Format a TAP stream using Mocha's set of reporters %prep %setup -q -n package %patch0 -p2 chmod -x index.js %nodejs_fixdep diff %nodejs_fixdep supports-color %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json index.js lib/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/tap test/*.js %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Mon Jan 18 2016 Jared Smith - 0.0.22-3 - Add MIT license to license tag * Mon Jan 18 2016 Jared Smith - 0.0.22-2 - Fix build dependencies * Mon Jan 18 2016 Jared Smith - 0.0.22-1 - Update to upstream 0.0.22 release * Sat Oct 31 2015 Jared Smith - 0.0.21-2 - Relax dependency version of several newer npm modules * Tue Oct 27 2015 Jared Smith - 0.0.21-1 - Initial packaging