%{?nodejs_find_provides_and_requires} %global packagename micromatch # Tests disabled because some of the testing dependencies actually depend on # this package -- go figure... %global enable_tests 0 Name: nodejs-micromatch Version: 3.1.10 Release: 1%{?dist} Summary: Glob matching for javascript/node.js License: MIT URL: https://github.com/jonschlinkert/micromatch.git Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz # The test files are not included in the npm tarball. # Source{1-3} are generated by running Source10, which pulls from the upstream # version control repository. Source1: tests-%{version}.tar.bz2 Source2: examples-%{version}.tar.bz2 Source10: dl-tests.sh Patch0: nodejs-micromatch_use-newer-snapdragon.patch BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging BuildRequires: npm(arr-diff) BuildRequires: npm(array-unique) BuildRequires: npm(braces) BuildRequires: npm(expand-brackets) BuildRequires: npm(extglob) BuildRequires: npm(filename-regex) BuildRequires: npm(is-glob) BuildRequires: npm(nanomatch) BuildRequires: npm(normalize-path) BuildRequires: npm(object.omit) BuildRequires: npm(parse-glob) BuildRequires: npm(regex-cache) %if 0%{?enable_tests} BuildRequires: mocha BuildRequires: npm(bash-match) BuildRequires: npm(for-own) BuildRequires: npm(should) %endif %description Glob matching for javascript/node.js. A drop-in replacement and faster alternative to minimatch and multimatch. Just use `micromatch.isMatch()` instead of `minimatch()`, or use `micromatch()` instead of `multimatch()`. %prep %setup -q -n package # setup the tests, docs, and examples %setup -q -T -D -a 1 -n package %setup -q -T -D -a 2 -n package %patch0 -p1 chmod -x index.js LICENSE %nodejs_fixdep extend-shallow '~2.0.1' %nodejs_fixdep is-extglob %nodejs_fixdep kind-of %nodejs_fixdep snapdragon '~0.12.0' %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json index.js lib/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/mocha -R spec %else %{_bindir}/echo "Tests disabled..." %endif %files %{!?_licensedir:%global license %doc} %doc examples/ %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Wed Apr 18 2018 Jared K. Smith - 3.1.10-1 - Update to upstream 3.1.10 release * Wed Apr 19 2017 Jared Smith - 2.3.11-2 - Relax dpendency on npm(is-extglob) * Fri Apr 14 2017 Jared Smith - 2.3.11-1 - Update to upstream 2.3.11 release * Fri Jul 22 2016 Jared Smith - 2.3.10-2 - Add missing BuildRequires * Wed Jul 13 2016 Jared Smith - 2.3.10-1 - Update to upstream 2.3.10 release * Sat Jun 18 2016 Jared Smith - 2.3.8-1 - Update to upstream 2.3.8 release * Wed Feb 3 2016 Jared Smith - 2.3.7-1 - Initial packaging