# test dep ava not in Fedora yet %global enable_tests 0 %global srcname get-stdin %global commit0 65c744975229b25d6cc5c7546f49b6ad9099553f %global gittag0 v4.0.1 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: nodejs-%{srcname} Version: 4.0.1 Release: 1%{?dist} Summary: Nodejs module for easier stdin License: MIT URL: https://github.com/sindresorhus/get-stdin 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(ava) BuildRequires: npm(buffer-equal) %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 \ %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check node test.js && node test-buffer.js && echo unicorns | node test-real.js %endif %files %doc readme.md %license license %{nodejs_sitelib}/%{srcname} %changelog * Sat Aug 29 2015 Piotr Popieluch - 4.0.1-1 - Initial package