55 lines
1.5 KiB
RPMSpec
55 lines
1.5 KiB
RPMSpec
|
|
%{?nodejs_find_provides_and_requires}
|
||
|
|
%global enable_tests 1
|
||
|
|
Name: nodejs-readdirp
|
||
|
|
Version: 2.1.0
|
||
|
|
Release: 1
|
||
|
|
Summary: Recursive version of Node's fs.readdir with a streaming API
|
||
|
|
License: MIT
|
||
|
|
URL: https://github.com/thlorenz/readdirp
|
||
|
|
Source0: https://registry.npmjs.org/readdirp/-/readdirp-%{version}.tgz
|
||
|
|
#git clone git://github.com/thlorenz/readdirp.git
|
||
|
|
#cd readdirp
|
||
|
|
#git archive --prefix="test/" --format=tar tags/v%{version}:test/ | bzip2 > tests-%{version}.tar.bz2
|
||
|
|
Source1: tests-v%{version}.tar.bz2
|
||
|
|
Patch0: nodejs-readdirp-pause.patch
|
||
|
|
BuildArch: noarch
|
||
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
||
|
|
BuildRequires: nodejs-packaging
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
BuildRequires: npm(graceful-fs) npm(minimatch) npm(proxyquire) npm(readable-stream)
|
||
|
|
BuildRequires: npm(set-immediate-shim) npm(tap) npm(through2)
|
||
|
|
%endif
|
||
|
|
%description
|
||
|
|
%{summary}.
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -n package
|
||
|
|
rm -rf test/
|
||
|
|
%setup -q -T -D -a 1 -n package
|
||
|
|
%patch0 -p1
|
||
|
|
find . -type f -exec chmod -x '{}' \;
|
||
|
|
%nodejs_fixdep minimatch "^3.0.0"
|
||
|
|
|
||
|
|
%build
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/readdirp
|
||
|
|
cp -pr package.json readdirp.js stream-api.js \
|
||
|
|
%{buildroot}%{nodejs_sitelib}/readdirp
|
||
|
|
%nodejs_symlink_deps
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
|
||
|
|
%check
|
||
|
|
%nodejs_symlink_deps --check
|
||
|
|
%__tap test/*.js
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%files
|
||
|
|
%doc README.md examples/
|
||
|
|
%license LICENSE
|
||
|
|
%{nodejs_sitelib}/readdirp
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Sat Aug 22 2020 wangyue <wangyue92@huawei.com> - 2.1.0-1
|
||
|
|
- package init
|