%global enable_tests 1 %global srcname mkfiletree Name: nodejs-%{srcname} Version: 1.0.1 Release: 1%{?dist} Summary: Nodejs module to make a tree of files and directories License: MIT URL: https://github.com/rvagg/node-mkfiletree Source0: https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(xregexp) BuildRequires: npm(temp) BuildRequires: npm(after) %endif %description %{summary}. %prep %setup -q -n package rm -rf node_modules %nodejs_fixdep rimraf '2.2.x' %nodejs_fixdep temp '0.x' %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json mkfiletree.js \ %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check node tests.js %endif %files %doc README.md %license LICENSE.md %{nodejs_sitelib}/%{srcname} %changelog * Mon Aug 31 2015 Piotr Popieluch - 1.0.1-1 - Update to 1.0.1 - Add license * Sun Aug 30 2015 Piotr Popieluch - 1.0.0-1 - Initial package