Blob Blame History Raw
%global enable_tests 1
%global srcname tar-stream

Name:           nodejs-%{srcname}
Version:        1.1.1
Release:        1%{?dist}
Summary:        A streaming tar parser and generator
License:        MIT
URL:            https://github.com/mafintosh/tar-stream
Source0:        https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz
# The test files are missing from the NPM tarball.
# Source1 is generated by running Source10, which pulls from the upstream
# version control repository.
Source1:        %{name}-tests-v%{version}.tar.bz2
Source10:       %{name}-dl-tests.sh

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 package
%setup -q -T -D -a 1 -n package
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
%{nodejs_sitelib}/%{srcname}


%changelog
* Mon Dec 22 2014 Piotr Popieluch <piotr1212@gmail.com> - 1.1.1-1
- Initial package