%{?nodejs_find_provides_and_requires} %global packagename multipipe %global enable_tests 1 Name: nodejs-multipipe Version: 1.0.2 Release: 1%{?dist} Summary: Pipe streams with centralized error handling License: MIT URL: https://github.com/juliangruber/multipipe.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(duplexer2) BuildRequires: npm(object-assign) %if 0%{?enable_tests} BuildRequires: mocha BuildRequires: npm(through2) %endif %description Pipe streams with centralized error handling. %prep %setup -q -n package # create license file from the Readme.md file sed '0,/^## License/d' Readme.md > LICENSE.md %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 -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %{!?_licensedir:%global license %doc} %doc Readme.md History.md %license LICENSE.md %{nodejs_sitelib}/%{packagename} %changelog * Wed Apr 19 2017 Jared Smith - 1.0.2-1 - Update to upstream 1.0.2 release * Fri Jul 15 2016 Jared Smith - 0.3.1-1 - Update to upstream 0.3.1 release * Mon Feb 22 2016 Jared Smith - 0.3.0-1 - Initial packaging