Blob Blame History Raw
%global enable_tests 1
%global module_name through2

Name:           nodejs-%{module_name}
Version:        0.6.3
Release:        1%{?dist}
Summary:        Node streams2 Transform wrapper to avoid explicit subclassing noise

License:        MITNFA
URL:            https://github.com/rvagg/through2
Source0:        https://github.com/rvagg/through2/archive/v0.6.3.tar.gz
BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires:  npm(tap)
BuildRequires:  npm(tape)
BuildRequires:  npm(xtend)
BuildRequires:  npm(bl)
BuildRequires:  npm(stream-spigot)
%endif

%description
A tiny wrapper around Node streams2 Transform to avoid explicit subclassing
noise.

%prep
%setup -q -n %{module_name}-%{version}
rm -rf node_modules

%nodejs_fixdep readable-stream ~1.x

%build
# nothing to build

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
cp -pr package.json *.js %{buildroot}%{nodejs_sitelib}/%{module_name}
%nodejs_symlink_deps

%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
node test/test.js
%endif

%files
%doc README.md LICENSE
%{nodejs_sitelib}/%{module_name}

%changelog
* Mon Dec 22 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.6.3-1
- Initial packaging