%{?nodejs_find_provides_and_requires} %global packagename git-raw-commits # Tests run locally, but timeout in mock, probably due to lack of network # access %global enable_tests 0 Name: nodejs-git-raw-commits Version: 1.3.3 Release: 1%{?dist} Summary: Get raw git commits out of your repository using git-log(1) License: MIT URL: https://github.com/conventional-changelog/git-raw-commits Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # The test files are not included in the npm tarball. Source1: https://raw.githubusercontent.com/conventional-changelog/conventional-changelog/%{packagename}%40%{version}/packages/git-raw-commits/test.js # License Source2: LICENSE-MIT-stevemao.txt ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging BuildRequires: npm(dargs) BuildRequires: npm(meow) BuildRequires: npm(lodash.template) BuildRequires: npm(split2) BuildRequires: npm(through2) %if 0%{?enable_tests} BuildRequires: mocha BuildRequires: npm(chai) BuildRequires: npm(shelljs) %endif %description Get raw git commits out of your repository using git-log(1) %prep %autosetup -n package -p1 # setup the tests cp -p %{SOURCE1} . cp -p %{SOURCE2} . sed -i '1s/env //' cli.js %nodejs_fixdep dargs %nodejs_fixdep lodash.template %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json cli.js index.js \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/mocha -R spec %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %doc README.md CHANGELOG.md %license LICENSE-MIT-stevemao.txt %{nodejs_sitelib}/%{packagename} %changelog * Wed Feb 21 2018 Jared Smith - 1.3.3-1 - Update to upstream 1.3.3 release * Sun May 7 2017 Jared Smith - 1.2.0-1 - Initial packaging