%global enable_tests 1 %global srcname strip-indent %global commit0 addcf90a56001ea122e9f1254987016bc87e5b5f %global gittag0 v1.0.1 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: nodejs-%{srcname} Version: 1.0.1 Release: 1%{?dist} Summary: Strip leading whitespace from every line in a string License: MIT URL: https://github.com/sindresorhus/strip-indent Source0: https://github.com/sindresorhus/%{srcname}/archive/%{commit0}.tar.gz#/%{srcname}-%{shortcommit0}.tar.gz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(mocha) %endif %description %{summary}. %prep %setup -qn %{srcname}-%{commit0} rm -rf node_modules %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json index.js cli.js \ %{buildroot}%{nodejs_sitelib}/%{srcname} mkdir -p %{buildroot}%{_bindir} ln -s %{nodejs_sitelib}/%{srcname}/cli.js %{buildroot}%{_bindir}/strip-indent %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check mocha %endif %files %doc readme.md %license license %{nodejs_sitelib}/%{srcname} %{_bindir}/%{srcname} %changelog * Sat Aug 29 2015 Piotr Popieluch - 1.0.1-1 - Initial package