2020-09-01 17:14:45 +08:00
|
|
|
%{?nodejs_find_provides_and_requires}
|
|
|
|
|
%global packagename tap-parser
|
|
|
|
|
%global enable_tests 1
|
2020-09-07 16:50:13 +08:00
|
|
|
Name: nodejs-tap-parser
|
2023-02-11 10:57:48 +08:00
|
|
|
Version: 4.0.0
|
2020-09-07 16:50:13 +08:00
|
|
|
Release: 1
|
|
|
|
|
Summary: Parse the test anything protocol
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/substack/tap-parser.git
|
|
|
|
|
Source0: https://github.com/substack/tap-parser/archive/v%{version}.tar.gz
|
|
|
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
BuildRequires: nodejs-packaging
|
2020-09-01 17:14:45 +08:00
|
|
|
%if 0%{?enable_tests}
|
2020-09-07 16:50:13 +08:00
|
|
|
BuildRequires: npm(events-to-array) npm(glob) npm(js-yaml) npm(tap) npm(tape)
|
2020-09-01 17:14:45 +08:00
|
|
|
%endif
|
|
|
|
|
%description
|
|
|
|
|
Parse the test anything protocol.
|
|
|
|
|
|
|
|
|
|
%prep
|
2020-09-07 16:50:13 +08:00
|
|
|
%autosetup -n tap-parser-%{version}
|
2020-09-01 17:14:45 +08:00
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
cp -pr package.json *.js \
|
|
|
|
|
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}/bin/
|
|
|
|
|
cp -pr package.json bin/*.js \
|
|
|
|
|
%{buildroot}%{nodejs_sitelib}/%{packagename}/bin/
|
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
|
ln -sf %{nodejs_sitelib}/%{packagename}/bin/cmd.js \
|
|
|
|
|
%{buildroot}%{_bindir}/tap-parser
|
|
|
|
|
%nodejs_symlink_deps
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%nodejs_symlink_deps --check
|
|
|
|
|
%{__nodejs} -e 'require("./")'
|
|
|
|
|
%if 0%{?enable_tests}
|
2023-02-11 10:57:48 +08:00
|
|
|
%{_bindir}/tap test/parser.js
|
2020-09-01 17:14:45 +08:00
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%{!?_licensedir:%global license %doc}
|
|
|
|
|
%doc *.markdown
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
%{_bindir}/tap-parser
|
|
|
|
|
|
|
|
|
|
%changelog
|
2023-02-11 10:57:48 +08:00
|
|
|
* Sat Feb 11 2023 wangkai <wangkai385@h-partners.com> - 4.0.0-1
|
|
|
|
|
- upgrade to version 4.0.0
|
|
|
|
|
|
2020-09-01 17:14:45 +08:00
|
|
|
* Fri Aug 21 2020 wangyue <wangyue92@huawei.com> - 1.2.2-1
|
|
|
|
|
- package init
|