%global enable_tests 1 %global srcname install %global commit0 7dc68c0d65461c197a018c2a7a9d3ec6ac771ff7 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: nodejs-%{srcname} Version: 0.1.8 Release: 1%{?dist} Summary: Minimal JavaScript module loader License: MIT URL: https://github.com/benjamn/install Source0: https://github.com/benjamn/%{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 install.js main.js \ %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check mocha test/run.js %endif %files %doc README.md docs/ %license LICENSE %{nodejs_sitelib}/%{srcname} %changelog * Tue Sep 08 2015 Piotr Popieluch - 0.1.8-1 - Initial package