%{?nodejs_find_provides_and_requires} %global packagename coveralls # tests disabled due to failing tests on git, despite the patch to fix some of # the test syntax issues %global enable_tests 0 Name: nodejs-coveralls Version: 2.11.12 Release: 3%{?dist} Summary: Takes json-cov output into stdin and POSTs to coveralls.io License: BSD URL: https://github.com/nickmerwin/node-coveralls.git Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # # No license file upstream, see https://github.com/nickmerwin/node-coveralls/issues/121 # In the meantime, package.json specifies BSD-2-clause, so we'll add that license text # until upstream adds it there Source1: LICENSE-BSD-2.txt # Add a patch to fix syntax of the 'should' module. It has changed from # should.be.a.("string") to should.be.a.String() Patch0: coveralls-2.11.4-fix-should-syntax.patch ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging BuildRequires: npm(js-yaml) BuildRequires: npm(minimist) BuildRequires: npm(lcov-parse) BuildRequires: npm(log-driver) BuildRequires: npm(request) BuildRequires: npm(sinon-restore) %if 0%{?enable_tests} BuildRequires: mocha %endif Requires: nodejs %description takes json-cov output into stdin and POSTs to coveralls.io %prep %setup -q -n package cp -p %{SOURCE1} . %patch0 -p1 %nodejs_fixdep js-yaml %nodejs_fixdep lcov-parse '~0.0.6' %nodejs_fixdep log-driver '~1.2.4' %nodejs_fixdep request '^2.40.0' # fix script interpreter sed -i '1!b;s/env node/node/' ./bin/coveralls.js %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json *.js fixtures/ lib/ test/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}/bin install -p -D -m0755 bin/coveralls.js \ %{buildroot}%{nodejs_sitelib}/%{packagename}/bin/coveralls.js mkdir -p %{buildroot}%{_bindir} ln -sf %{nodejs_sitelib}/%{packagename}/bin/coveralls.js \ %{buildroot}%{_bindir}/coveralls %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} /usr/bin/mocha -R spec %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %{!?_licensedir:%global license %doc} %doc *.md %{nodejs_sitelib}/%{packagename} %{_bindir}/coveralls %changelog * Sat Aug 06 2016 Jared Smith - 2.11.12-3 - Fix script interpreter in bin/coveralls.js * Fri Aug 05 2016 Jared Smith - 2.11.12-2 - Add license file until upstream adds one there * Fri Aug 05 2016 Jared Smith - 2.11.12-1 - Update to upstream 2.11.12 release * Thu Jul 14 2016 Jared Smith - 2.11.11-1 - Update to upstream 2.11.11 release * Wed Feb 03 2016 Jared Smith - 2.11.6-1 - Update to upstream 2.11.6 release * Sat Oct 31 2015 Jared Smith - 2.11.4-2 - Fixup dependency versions * Thu Oct 15 2015 Jared Smith - 2.11.4-1 - Initial packaging