%global enable_tests 1 %global srcname hash_file Name: nodejs-%{srcname} Version: 0.1.1 Release: 1%{?dist} Summary: A simple utility for getting a hash of a file License: MIT # license is in README.md URL: https://github.com/timoxley/hash_file Source0: https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(mocha) %endif %description %{summary}. %prep %setup -q -n package rm -rf node_modules/ %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json *.js %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check mocha -t 60000 ./test/test.js %endif %files %doc README.md %{nodejs_sitelib}/%{srcname} %changelog * Mon Dec 22 2014 Piotr Popieluch - 0.1.1-1 - Initial package