%global enable_tests 1 %global srcname sentence-case Name: nodejs-%{srcname} Version: 1.1.0 Release: 1%{?dist} Summary: Sentence case a string License: MIT URL: https://github.com/blakeembrey/sentence-case 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(mocha) BuildRequires: npm(chai) %endif %description Sentence case a string, with full support for non-ASCII characters. Also handles non-string entities, such as objects with a toString property, numbers and booleans. Empty values (null and undefined) will come out as an empty string. %prep %setup -q -n package rm -rf node_modules/ %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json sentence-case.js %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr vendor %{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.1.0-1 - Initial package