2020-08-20 10:11:18 +08:00
|
|
|
%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
|
2022-05-10 15:59:03 +08:00
|
|
|
Release: 2
|
2020-08-20 10:11:18 +08:00
|
|
|
Summary: Test spies, stubs and mocks for JavaScript
|
2022-05-10 15:59:03 +08:00
|
|
|
License: BSD-3-Clause
|
2020-08-20 10:11:18 +08:00
|
|
|
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
|
2022-05-10 15:59:03 +08:00
|
|
|
* Tue May 10 2022 liyanan <liyanan32@h-partners.com> - 1.17.1-2
|
|
|
|
|
- License compliance rectification
|
|
|
|
|
|
2020-08-20 10:11:18 +08:00
|
|
|
* Sat Aug 15 2020 zhanghua <zhanghua40@huawei.com> - 1.17.1-1
|
|
|
|
|
- Package init
|