%global enable_tests 1 %global srcname lower-case-first %global commit0 f2853d681463ca60ca5c72970d553a8082abd60c %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: nodejs-%{srcname} Version: 1.0.0 Release: 1%{?dist} Summary: Lower case the first character of a string License: MIT URL: https://github.com/blakeembrey/%{srcname} Source0: https://github.com/blakeembrey/%{srcname}/archive/%{commit0}.tar.gz#/%{srcname}-%{shortcommit0}.tar.gz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(lower-case) BuildRequires: npm(istanbul) BuildRequires: npm(mocha) %endif %description Lower case the first character of a string. Supports Unicode (non-ASCII characters) and non-string entities, such as objects with a toString property, numbers and booleans. Empty values (null and undefined) will result in an empty string. %prep %setup -qn %{srcname}-%{commit0} %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json lower-case-first.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 LICENSE %{nodejs_sitelib}/%{srcname} %changelog * Fri Jul 24 2015 Piotr Popieluch - 1.0.0-1 - Initial package