%global enable_tests 1 %global srcname path-case Name: nodejs-%{srcname} Version: 1.0.1 Release: 1%{?dist} Summary: Path case a string License: MIT Group: System Environment/Libraries URL: https://github.com/blakeembrey/%{srcname} Source0: http://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(istanbul) BuildRequires: npm(sentence-case) BuildRequires: npm(mocha) %endif %description %{summary}. %prep %setup -q -n package %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json path-case.js %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check istanbul-js cover mocha -- -R spec %endif %files %doc README.md LICENSE %{nodejs_sitelib}/%{srcname} %changelog * Sun Nov 16 2014 Piotr Popieluch - 1.0.1-1 - Initial package