%{?nodejs_find_provides_and_requires} %global enable_tests 1 Name: nodejs-lazystream Version: 0.1.0 Release: 1%{?dist} Summary: Create streams lazily when they are read from or written to License: MIT Group: System Environment/Libraries URL: https://github.com/jpommerening/node-lazystream Source0: https://registry.npmjs.org/lazystream/-/lazystream-%{version}.tgz # Do not require the use of the readable-stream module in tests. # # This module is not required with node >= 0.10, this functionality is now in # node core. # # The code itself uses the core interface and only falls back to readable-stream # when not available. Unfortunately, the tests require massaging to do # likewise. Patch1: %{name}-use-core-streams-tests.patch BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(nodeunit) %endif %description %{summary}. %prep %setup -q -n package %patch1 -p1 #use the built-in streams interface instead of the compat module #the code already uses the built-in and just uses this as a fallback, so we can #safely omit this dep %nodejs_fixdep -r readable-stream %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/lazystream cp -pr package.json lib \ %{buildroot}%{nodejs_sitelib}/lazystream %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check nodeunit test/*_test.js %endif %files %doc LICENSE-MIT README.md %{nodejs_sitelib}/lazystream %changelog * Fri Mar 21 2014 T.C. Hollingsworth - 0.1.0-1 - initial package