%{?nodejs_find_provides_and_requires} %global enable_tests 1 Name: nodejs-readdirp Version: 0.4.0 Release: 1%{?dist} Summary: Recursive version of Node's fs.readdir with a streaming API License: MIT Group: System Environment/Libraries URL: https://github.com/thlorenz/readdirp Source0: http://registry.npmjs.org/readdirp/-/readdirp-%{version}.tgz # The test files are not included in the npm tarball. # Source1 is generated by running Source10, which pulls from the upstream # version control repository. Source1: tests-v%{version}.tar.bz2 Source10: dl-tests.sh BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(graceful-fs) BuildRequires: npm(minimatch) BuildRequires: npm(tap) BuildRequires: npm(through) %endif %description %{summary}. %prep %setup -q -n package # The NPM tarball is missing some files within test/ rm -rf test/ %setup -q -T -D -a 1 -n package # Remove executable bit. find . -type f -exec chmod -x '{}' \; %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/readdirp cp -pr package.json readdirp.js stream-api.js \ %{buildroot}%{nodejs_sitelib}/readdirp %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %__tap test/*.js %endif %files %doc LICENSE README.md examples/ %{nodejs_sitelib}/readdirp %changelog * Sat Apr 26 2014 Jamie Nguyen - 0.4.0-1 - update to upstream release 0.4.0 * Sun Mar 02 2014 Jamie Nguyen - 0.3.3-1 - initial package