[nodejs-lazystream] initial import (RHBZ#1082401)

T.C. Hollingsworth patches at fedoraproject.org
Mon Dec 29 06:12:14 UTC 2014


commit 22ecee7292d6c7305e3f45ee70495df229f51556
Author: T.C. Hollingsworth <tchollingsworth at gmail.com>
Date:   Sun Dec 28 23:11:05 2014 -0700

    initial import (RHBZ#1082401)

 .gitignore                                     |    1 +
 nodejs-lazystream-use-core-streams-tests.patch |   11 ++++
 nodejs-lazystream.spec                         |   75 ++++++++++++++++++++++++
 sources                                        |    1 +
 4 files changed, 88 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..665eff3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/lazystream-0.1.0.tgz
diff --git a/nodejs-lazystream-use-core-streams-tests.patch b/nodejs-lazystream-use-core-streams-tests.patch
new file mode 100644
index 0000000..cf65629
--- /dev/null
+++ b/nodejs-lazystream-use-core-streams-tests.patch
@@ -0,0 +1,11 @@
+--- package.orig/test/helper.js	2013-04-03 12:58:06.000000000 -0700
++++ package/test/helper.js	2014-03-30 17:13:22.437231578 -0700
+@@ -1,6 +1,6 @@
+ 
+-var _Readable = require('readable-stream/readable');
+-var _Writable = require('readable-stream/writable');
++var _Readable = require('stream').Readable;
++var _Writable = require('stream').Writable;
+ var util = require('util');
+ 
+ module.exports = {
diff --git a/nodejs-lazystream.spec b/nodejs-lazystream.spec
new file mode 100644
index 0000000..ed36ec3
--- /dev/null
+++ b/nodejs-lazystream.spec
@@ -0,0 +1,75 @@
+%{?nodejs_find_provides_and_requires}
+
+%global enable_tests 1
+
+Name:       nodejs-lazystream
+Version:    0.1.0
+Release:    1%{?dist}
+Summary:    Create streams lazily when they are read from or written to
+License:    MIT
+Group:      System Environment/Libraries
+URL:        https://github.com/jpommerening/node-lazystream
+Source0:    https://registry.npmjs.org/lazystream/-/lazystream-%{version}.tgz
+
+# Do not require the use of the readable-stream module in tests.
+#
+# This module is not required with node >= 0.10, this functionality is now in
+# node core.
+#
+# The code itself uses the core interface and only falls back to readable-stream
+# when not available.  Unfortunately, the tests require massaging to do
+# likewise.
+Patch1:     %{name}-use-core-streams-tests.patch
+
+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(nodeunit)
+%endif
+
+%description
+%{summary}.
+
+
+%prep
+%setup -q -n package
+%patch1 -p1
+
+#use the built-in streams interface instead of the compat module
+#the code already uses the built-in and just uses this as a fallback, so we can
+#safely omit this dep
+%nodejs_fixdep -r readable-stream
+
+%build
+#nothing to do
+
+
+%install
+mkdir -p %{buildroot}%{nodejs_sitelib}/lazystream
+cp -pr package.json lib \
+    %{buildroot}%{nodejs_sitelib}/lazystream
+
+%nodejs_symlink_deps
+
+%if 0%{?enable_tests}
+%check
+%nodejs_symlink_deps --check
+nodeunit test/*_test.js
+%endif
+
+
+%files
+%doc LICENSE-MIT README.md
+%{nodejs_sitelib}/lazystream
+
+
+%changelog
+* Fri Mar 21 2014 T.C. Hollingsworth <tchollingsworth at gmail.com> - 0.1.0-1
+- initial package
diff --git a/sources b/sources
index e69de29..8babe5e 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+28c58eb3a389978da41f45c966eac761  lazystream-0.1.0.tgz


More information about the scm-commits mailing list