nodejs-fileset/nodejs-fileset.spec
2020-08-21 16:30:03 +08:00

49 lines
1.3 KiB
RPMSpec

%{?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
Source0: https://registry.npmjs.org/fileset/-/fileset-%{version}.tgz
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
%setup -q -n package
%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