%global enable_tests 1 %global srcname clone Name: nodejs-%{srcname} Version: 0.1.18 Release: 2%{?dist} Summary: Deep cloning of objects and arrays License: MIT URL: https://github.com/pvorb/node-clone Source0: http://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: nodeunit BuildRequires: npm(underscore) %endif %description Offers foolproof deep cloning of variables in JavaScript. %prep %setup -q -n package rm -rf node_modules/ %build #nothing to do %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 %{nodejs_sitelib}/%{srcname} %changelog * Sat Dec 6 2014 Piotr Popieluch - 0.1.18-2 - Added LICENSE to %%files - Added rm -rf node_modules to %%prep - Capitalized summary - Removed Group tag * Fri Nov 21 2014 Piotr Popieluch - 0.1.18-1 - Initial package