%global enable_tests 1
%global module_name from2
%global gittag0 v2.1.0
Name: nodejs-%{module_name}
Version: 2.1.0
Release: 7%{?dist}
Summary: Wrapper for ReadableStream, with an API lifted from "from" and "through2"
License: MIT
URL: https://github.com/hughsk/from2
Source0: https://github.com/hughsk/%{module_name}/archive/%{gittag0}.tar.gz#/%{module_name}-%{version}.tar.gz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(tape)
BuildRequires: npm(inherits)
BuildRequires: npm(readable-stream)
%endif
%description
from2 is a high-level module for creating readable streams that properly
handle backpressure.
%prep
%setup -q -n %{module_name}-%{version}
rm -rf node_modules
%build
# nothing to build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
cp -p package.json index.js %{buildroot}%{nodejs_sitelib}/%{module_name}
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
node test.js
%endif
%files
%doc README.md
%license LICENSE.md
%{nodejs_sitelib}/%{module_name}
%changelog
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Fri Dec 18 2015 Parag Nemade <pnemade AT redhat DOT com> - 2.1.0-4
- bump for upgrade path f23->f24
* Sun Nov 22 2015 Tom Hughes <tom@compton.nu> - 2.1.0-3
- Remove fixdep that added duplicate inherits dependency
* Wed Aug 26 2015 Parag Nemade <pnemade AT redhat DOT com> - 2.1.0-2
- Use easier git tag source guidelines
* Fri Aug 07 2015 Parag Nemade <pnemade AT redhat DOT com> - 2.1.0-1
- Initial packaging