Blob Blame History Raw
# This macro is needed at the start for building on EL6
%{?nodejs_find_provides_and_requires}

%global enable_tests 1

%global barename readable-stream
%global owner nodejs

Name:               nodejs-readable-stream
Version:            2.0.5
Release:            2%{?dist}
Summary:            Streams3, a user-land copy of the stream library from Node.js v0.10.x

License:            MIT
URL:                https://www.npmjs.org/package/readable-stream
Source0:            https://github.com/%{owner}/%{barename}/archive/v%{version}/%{barename}-%{version}.tar.gz
BuildArch:          noarch
%if 0%{?fedora} >= 19
ExclusiveArch:      %{nodejs_arches} noarch
%else
ExclusiveArch:      %{ix86} x86_64 %{arm} noarch
%endif

BuildRequires:      nodejs-packaging >= 6

BuildRequires:      npm(core-util-is)
BuildRequires:      npm(isarray)
BuildRequires:      npm(process-nextick-args)
BuildRequires:      npm(string_decoder)
BuildRequires:      npm(util-deprecate)

%if 0%{?enable_tests}
BuildRequires:      npm(tap)
BuildRequires:      npm(tape)
%endif


%description
This package is a mirror of the Streams2 and Streams3 implementations in
Node-core.

%prep
%setup -qn %{barename}-%{version}

# Remove bundled node_modules if there are any..
rm -rf node_modules/

%nodejs_fixdep --caret

%build
#%%nodejs_symlink_deps --build

%install
mkdir -p %{buildroot}%{nodejs_sitelib}/readable-stream
cp -pr package.json lib duplex.js passthrough.js writable.js transform.js readable.js \
    %{buildroot}%{nodejs_sitelib}/readable-stream

%nodejs_symlink_deps

%check
%if 0%{?enable_tests}
%nodejs_symlink_deps --check
tap test/parallel/*.js
%endif

%files
%doc README.md
%license LICENSE
%{nodejs_sitelib}/readable-stream/

%changelog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Sun Jan 17 2016 Tom Hughes <tom@compton.nu> - 2.0.5-1
- Update to 2.0.5 upstream release

* Tue Dec 15 2015 Piotr Popieluch <piotr1212@gmail.com> - 2.0.4-1
- Update to 2.0.4
- Change source to github
- Enable tests

* Fri Oct 23 2015 Piotr Popieluch <piotr1212@gmail.com> - 2.0.3-1
- Update to 2.0.3
- Remove requires which are autogenerated
- Move license to %%license tag

* Sat Jul 18 2015 Parag Nemade <pnemade AT redhat DOT com> - 2.0.2-1
- Update to 2.0.2 version

* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild

* Thu May 14 2015 Ralph Bean <rbean@redhat.com> - 1.1.13-1
- new version

* Tue Jul 22 2014 Ralph Bean <rbean@redhat.com> - 1.1.9-1
- Initial packaging for Fedora.