%global enable_tests 1 %global srcname change-case Name: nodejs-%{srcname} Version: 2.1.5 Release: 1%{?dist} Summary: Convert a string between camelCase, PascalCase, Title Case, snake_case and more License: MIT URL: https://github.com/blakeembrey/change-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(camel-case) BuildRequires: npm(constant-case) BuildRequires: npm(dot-case) BuildRequires: npm(is-lower-case) BuildRequires: npm(is-upper-case) BuildRequires: npm(param-case) BuildRequires: npm(pascal-case) BuildRequires: npm(path-case) BuildRequires: npm(swap-case) BuildRequires: npm(title-case) BuildRequires: npm(mocha) %endif %description Convert strings between camelCase, PascalCase, Title Case, snake_case, lowercase, UPPERCASE, CONSTANT_CASE and more. %prep %setup -q -n package %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json change-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 - 2.1.5-1 - Initial package