%global enable_tests 1 %global srcname isstream Name: nodejs-%{srcname} Version: 0.1.2 Release: 2%{?dist} Summary: Determine if an object is a Stream License: MIT URL: https://github.com/rvagg/isstream Source0: https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(tape) BuildRequires: npm(core-util-is) BuildRequires: npm(isarray) BuildRequires: npm(string_decoder) BuildRequires: npm(inherits) # Package ships with two bundled versions of readable-stream for tests. # We are only interested in testing against the version which is actually in # Fedora. BuildRequires: npm(readable-stream) %endif %description %{summary}. %prep %setup -q -n package rm -rf node_modules # symlink Fedora packaged readable-stream for testing %nodejs_fixdep --dev readable-stream %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json isstream.js \ %{buildroot}%{nodejs_sitelib}/%{srcname} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check # extra symlinks so we use Fedora shipped readable-stream ln -s ./node_modules/readable-stream readable-stream-1.0 ln -s ./node_modules/readable-stream readable-stream-1.1 node test.js %endif %files %doc README.md %license LICENSE.md %{nodejs_sitelib}/%{srcname} %changelog * Fri Nov 06 2015 Piotr Popieluch - 0.1.2-2 - Add readable-stream to BR and symlinks and enable tests * Sat Oct 24 2015 Piotr Popieluch - 0.1.2-1 - Initial package