%{?nodejs_find_provides_and_requires} %global packagename select-hose %global enable_tests 1 Name: nodejs-select-hose Version: 2.0.0 Release: 1%{?dist} Summary: Select protocol using first bytes of incoming data and hose stuff to the handler License: MIT URL: https://github.com/indutny/select-hose Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: mocha BuildRequires: npm(handle-thing) BuildRequires: npm(stream-pair) %endif %description Select protocol using first bytes of incoming data and hose stuff to the handler %prep %autosetup -n package tail -n 24 README.md > LICENSE %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json lib/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/mocha -R spec test/*-test.js %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %doc README.md %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Fri Sep 29 2017 Jared Smith - 2.0.0-1 - Initial packaging