%global enable_tests 0 %global module_name callsites Name: nodejs-%{module_name} Version: 2.0.0 Release: 1 Summary: Get callsites from the V8 stack trace API License: MIT URL: https://github.com/sindresorhus/callsites Source0: http://registry.npmjs.org/callsites/-/callsites-%{version}.tgz Source1: https://github.com/sindresorhus/callsites/v2.0.0/test.js BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(xo) npm(ava) %endif %description %{summary}. %prep %setup -q -n package rm -rf node_modules cp -p %{SOURCE1} . %build %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name} cp -pr package.json *.js %{buildroot}%{nodejs_sitelib}/%{module_name} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' xo && ava %endif %files %doc readme.md %license license %{nodejs_sitelib}/%{module_name} %changelog * Fri Aug 21 2020 leiju - 2.0.0-1 - Package init