%global enable_tests 1 %global srcname clone Name: nodejs-%{srcname} Version: 1.0.2 Release: 1 Summary: Deep cloning of objects and arrays License: MIT URL: https://github.com/pvorb/clone Source0: https://registry.npmjs.org/clone/-/clone-%{version}.tgz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: nodeunit npm(underscore) %endif %description Offers foolproof deep cloning of variables in JavaScript. %prep %setup -q -n package rm -rf node_modules/ %build %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json clone.js %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check nodeunit test.js %endif %files %doc README.md %license LICENSE %{nodejs_sitelib}/%{srcname} %changelog * Mon Aug 17 2020 Anan Fu - 1.0.2-1 - package init