From f49691c1b05515f5305bbb795daaab2fabce2653 Mon Sep 17 00:00:00 2001 From: Jamie Nguyen Date: Mar 03 2014 21:11:04 +0000 Subject: Initial import --- diff --git a/.gitignore b/.gitignore index e69de29..dc0fbf8 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/readdirp-0.3.3.tgz +/tests-v0.3.3.tar.bz2 diff --git a/dl-tests.sh b/dl-tests.sh new file mode 100644 index 0000000..1f6ea78 --- /dev/null +++ b/dl-tests.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +tag=v0.3.3 + +set -e + +tmp=$(mktemp -d) + +trap cleanup EXIT +cleanup() { + set +e + [ -z "$tmp" -o ! -d "$tmp" ] || rm -rf "$tmp" +} + +unset CDPATH +pwd=$(pwd) + +pushd "$tmp" +git clone git://github.com/thlorenz/readdirp.git +cd readdirp +git archive --prefix="test/" --format=tar tags/${tag}:test/ \ + | bzip2 > "$pwd"/tests-${tag}.tar.bz2 +popd diff --git a/nodejs-readdirp.spec b/nodejs-readdirp.spec new file mode 100644 index 0000000..86aef48 --- /dev/null +++ b/nodejs-readdirp.spec @@ -0,0 +1,74 @@ +%{?nodejs_find_provides_and_requires} + +%global enable_tests 1 + +Name: nodejs-readdirp +Version: 0.3.3 +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 +* Sun Mar 02 2014 Jamie Nguyen - 0.3.3-1 +- initial package diff --git a/sources b/sources index e69de29..e2d86b5 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +be7ee130bdcad5d2bda10d9561f56a77 readdirp-0.3.3.tgz +f5b1ac3460a604cfc8985bd9b2744e66 tests-v0.3.3.tar.bz2