%{?nodejs_find_provides_and_requires} %global packagename glob-parent %global enable_tests 1 Name: nodejs-glob-parent Version: 2.0.0 Release: 2%{?dist} Summary: Strips glob magic from a string to provide the parent path License: ISC URL: https://github.com/es128/glob-parent.git Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging BuildRequires: npm(is-glob) %if 0%{?enable_tests} BuildRequires: mocha %endif %description Strips glob magic from a string to provide the parent path %prep %setup -q -n package %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json index.js \ %{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 *.md %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Tue Jul 19 2016 Jared Smith - 2.0.0-2 - Add missing BuildRequire line * Tue Feb 9 2016 Jared Smith - 2.0.0-1 - Initial packaging