%global enable_tests 1
%global srcname tar-stream
Name: nodejs-%{srcname}
Version: 1.1.2
Release: 1%{?dist}
Summary: A streaming tar parser and generator
License: MIT
URL: https://github.com/mafintosh/tar-stream
Source0: https://github.com/mafintosh/%{srcname}/archive/v%{version}/%{srcname}-%{version}.tar.gz
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(tape)
BuildRequires: npm(bl)
BuildRequires: npm(xtend)
BuildRequires: npm(end-of-stream)
BuildRequires: npm(concat-stream)
%endif
%description
tar-stream is a streaming tar parser and generator and nothing else. It is
streams2 and operates purely using streams which means you can easily
extract/parse tarballs without ever hitting the file system.
%prep
%setup -q -n %{srcname}-%{version}
rm -rf node_modules/
%build
#nothing to do
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
cp -pr package.json *.js %{buildroot}%{nodejs_sitelib}/%{srcname}
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
tape test/*.js
%endif
%files
%doc README.md
%license LICENSE
%{nodejs_sitelib}/%{srcname}
%changelog
* Sun Feb 8 2015 Piotr Popieluch <piotr1212@gmail.com> - 1.1.2-1
- update to 1.1.2
* Mon Dec 22 2014 Piotr Popieluch <piotr1212@gmail.com> - 1.1.1-1
- Initial package