%global enable_tests 1 %global srcname lazystream Name: nodejs-%{srcname} Version: 0.1.0 Release: 1%{?dist} Summary: Open Node Streams on demand License: MIT URL: https://github.com/jpommerening/node-lazystream Source0: http://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: nodeunit BuildRequires: npm(readable-stream) %endif %description Create streams lazily when they are accessed (read from/written to). %prep %setup -q -n package rm -rf node_modules/ %nodejs_fixdep readable-stream ^1.1 %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json lib %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check nodeunit test/readable_test.js test/writable_test.js test/pipe_test.js test/fs_test.js %endif %files %doc README.md LICENSE-MIT %{nodejs_sitelib}/%{srcname} %changelog * Mon Dec 22 2014 Piotr Popieluch - 0.1.0-1 - Initial package