diff --git a/Sinon.JS-de6b53476dbcee95a366b719c0098af86a05d867.tar.gz b/Sinon.JS-de6b53476dbcee95a366b719c0098af86a05d867.tar.gz new file mode 100644 index 0000000..f522315 Binary files /dev/null and b/Sinon.JS-de6b53476dbcee95a366b719c0098af86a05d867.tar.gz differ diff --git a/nodejs-sinon.spec b/nodejs-sinon.spec new file mode 100644 index 0000000..990f37e --- /dev/null +++ b/nodejs-sinon.spec @@ -0,0 +1,50 @@ +%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 diff --git a/nodejs-sinon.yaml b/nodejs-sinon.yaml new file mode 100644 index 0000000..f350b63 --- /dev/null +++ b/nodejs-sinon.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: cjohansen/Sinon.JS +tag_pattern: "^v" +seperator: "."