%{?nodejs_find_provides_and_requires} %global packagename busboy %global enable_tests 1 Name: nodejs-busboy Version: 0.2.14 Release: 1%{?dist} Summary: A streaming parser for HTML form data for node.js License: MIT and ASL 2.0 URL: https://github.com/mscdex/busboy Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging BuildRequires: npm(dicer) %if 0%{?enable_tests} #BuildRequires: %endif %description A streaming parser for HTML form data for node.js %prep %autosetup -n mscdex-busboy-f70e0dd %nodejs_fixdep readable-stream %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json lib/ deps/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{__nodejs} test/test.js %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %doc README.md %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Sat Sep 16 2017 Jared Smith - 0.2.14-1 - Initial packaging