%global enable_tests 0 %global srcname sinon %global gitname Sinon.JS %global commit0 de6b53476dbcee95a366b719c0098af86a05d867 %global gittag0 v1.17.1 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: nodejs-%{srcname} Version: 1.17.1 Release: 1 Summary: Test spies, stubs and mocks for JavaScript License: BSD URL: https://github.com/cjohansen/Sinon.JS Source0: https://github.com/cjohansen/%{gitname}/archive/%{commit0}/%{gitname}-%{commit0}.tar.gz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(formatio) npm(lolex) npm(samsam) npm(util) npm(buster) npm(buster-core) BuildRequires: npm(buster-istanbul) %endif %description Standalone and test framework agnostic JavaScript test spies, stubs and mocks. %prep %setup -q -n %{srcname}-%{commit0} rm -rf node_modules/ %nodejs_fixdep formatio '1.x' %nodejs_fixdep lolex '1.3.x' %build %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json lib/ %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check buster-test --config-group node %endif %files %doc AUTHORS Changelog.txt CONTRIBUTING.md README.md RELEASE.md %license LICENSE %{nodejs_sitelib}/%{srcname} %changelog * Sat Aug 15 2020 zhanghua - 1.17.1-1 - Package init