%{?nodejs_find_provides_and_requires} %global packagename typedarray-to-buffer %global enable_tests 1 Name: nodejs-typedarray-to-buffer Version: 3.1.2 Release: 1%{?dist} Summary: Convert a typed array to a Buffer without a copy License: MIT URL: https://github.com/feross/typedarray-to-buffer Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{ix86} x86_64 %{arm} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(tape) BuildRequires: npm(is-typedarray) %endif %description Convert a typed array to a Buffer without a copy %prep %autosetup -n package %build # nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json *.js \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/tape test/*.js %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Tue Feb 13 2018 Jared Smith - 3.1.2-1 - Initial packaging