Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global enable_tests 1

Name:       nodejs-multimatch
Version:    0.1.0
Release:    3%{?dist}
Summary:    Adds multiple patterns support to minimatch.match()
License:    MIT
Group:      System Environment/Libraries
URL:        https://github.com/sindresorhus/multimatch
Source0:    http://registry.npmjs.org/multimatch/-/multimatch-%{version}.tgz
# https://raw.githubusercontent.com/sindresorhus/multimatch/187e210076239ee6b5dcecca65adc0074f1e8e53/test.js
Source1:    test-%{version}.js
# Include a copy of the MIT license to comply with license requirements.
Source2:    LICENSE

BuildArch:  noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires:  npm(lodash)
BuildRequires:  npm(minimatch)
BuildRequires:  npm(mocha)
%endif

%description
%{summary}.


%prep
%setup -q -n package
cp -p %{SOURCE1} test.js
cp -p %{SOURCE2} .

%nodejs_fixdep minimatch '~0.2.12'


%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/multimatch
cp -pr package.json index.js \
    %{buildroot}%{nodejs_sitelib}/multimatch

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
/usr/bin/mocha --reporter spec
%endif


%files
%doc LICENSE readme.md
%{nodejs_sitelib}/multimatch


%changelog
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Sat Mar 29 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.1.0-1
- initial package