%{?nodejs_find_provides_and_requires} %global packagename foreach %global enable_tests 1 Name: nodejs-foreach Version: 2.0.5 Release: 4%{?dist} Summary: foreach component + npm package License: MIT URL: https://github.com/manuelstofer/foreach Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz Source1: https://raw.githubusercontent.com/twada/array-foreach/master/MIT-LICENSE ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(tape) %endif %description foreach component + npm package %prep %setup -q -n package cp -p %{SOURCE1} . %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json *.js \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %__nodejs test.js %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license MIT-LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Sat Jul 02 2016 Jared Smith - 2.0.5-4 - Add the license file added by upstream * Mon Oct 26 2015 Jared Smith - 2.0.5-3 - Temporarily disable tests to bootstrap npm(tape) * Mon Oct 26 2015 Jared Smith - 2.0.5-2 - Initial packaging