2020-08-20 20:33:17 +08:00
|
|
|
%{?nodejs_find_provides_and_requires}
|
|
|
|
|
%global enable_tests 1
|
|
|
|
|
Name: nodejs-fileset
|
|
|
|
|
Version: 0.2.1
|
|
|
|
|
Release: 1
|
|
|
|
|
Summary: A wrapper around glob and minimatch for Node.js
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/mklabs/node-fileset
|
2020-09-07 20:20:32 +08:00
|
|
|
Source0: https://github.com/mklabs/node-fileset/archive/v%{version}.tar.gz
|
2020-08-20 20:33:17 +08:00
|
|
|
BuildArch: noarch
|
|
|
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
|
|
|
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
|
|
|
|
BuildRequires: nodejs-packaging
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
BuildRequires: npm(glob)
|
|
|
|
|
%endif
|
|
|
|
|
%description
|
|
|
|
|
This Node.js module exposes a basic wrapper on top of nodejs-glob and
|
|
|
|
|
nodejs-minimatch. It adds multiple patterns matching and allows a list
|
|
|
|
|
of include patterns and optional exclude patterns.
|
|
|
|
|
|
|
|
|
|
%prep
|
2020-09-07 20:20:32 +08:00
|
|
|
%autosetup -n node-fileset-%{version}
|
2020-08-20 20:33:17 +08:00
|
|
|
%nodejs_fixdep glob
|
|
|
|
|
%nodejs_fixdep minimatch
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/fileset
|
|
|
|
|
cp -pr package.json lib/ \
|
|
|
|
|
%{buildroot}%{nodejs_sitelib}/fileset
|
|
|
|
|
%nodejs_symlink_deps
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%nodejs_symlink_deps --check
|
|
|
|
|
%__nodejs ./tests/test.js && %__nodejs ./tests/test-sync.js
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc README.md CHANGELOG.md
|
|
|
|
|
%license LICENSE-MIT
|
|
|
|
|
%{nodejs_sitelib}/fileset
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Thu Aug 20 2020 Anan Fu <fuanan3@huawei.com> - 0.2.1-1
|
|
|
|
|
- package init
|