47 lines
1.2 KiB
RPMSpec
47 lines
1.2 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
%global enable_tests 1
|
|
Name: nodejs-traverse
|
|
Version: 0.6.6
|
|
Release: 1
|
|
Summary: Traverse and transform objects
|
|
License: MIT
|
|
URL: https://github.com/substack/js-traverse
|
|
Source0: https://registry.npmjs.org/traverse/-/traverse-%{version}.tgz
|
|
# https://github.com/substack/js-traverse/pull/51
|
|
Patch0: nodejs-traverse-tape.patch
|
|
BuildArch: noarch
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
BuildRequires: nodejs-packaging
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: npm(tap) npm(tape)
|
|
%endif
|
|
%description
|
|
Traverse and transform objects by visiting every node on a recursive walk.
|
|
|
|
%prep
|
|
%autosetup -p 1 -n package
|
|
chmod 0644 examples/*
|
|
|
|
%build
|
|
|
|
%install
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/traverse
|
|
cp -pr package.json index.js %{buildroot}%{nodejs_sitelib}/traverse
|
|
%nodejs_symlink_deps
|
|
%if 0%{?enable_tests}
|
|
|
|
%check
|
|
%nodejs_symlink_deps --check
|
|
%tap test/*.js
|
|
%endif
|
|
|
|
%files
|
|
%{!?_licensedir:%global license %doc}
|
|
%doc examples readme.markdown
|
|
%license LICENSE
|
|
%{nodejs_sitelib}/traverse
|
|
|
|
%changelog
|
|
* Tue Aug 11 2020 zhanghua <zhanghua40@huawei.com> - 0.6.6-1
|
|
- package init
|