From 9795f4cd5d6fb8d75631736fd00f77efadfa7c3b Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Dec 16 2015 15:45:48 +0000 Subject: import nodejs010-nodejs-concat-stream-1.4.4-5.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cdb75bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/concat-stream-1.4.4.tgz diff --git a/.nodejs010-nodejs-concat-stream.metadata b/.nodejs010-nodejs-concat-stream.metadata new file mode 100644 index 0000000..13e8e13 --- /dev/null +++ b/.nodejs010-nodejs-concat-stream.metadata @@ -0,0 +1 @@ +88cf474555dfbbdbeb34453e7f1e417dae97ce21 SOURCES/concat-stream-1.4.4.tgz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/nodejs-concat-stream-1.4.4-Remove-dependency-on-typedarray.patch b/SOURCES/nodejs-concat-stream-1.4.4-Remove-dependency-on-typedarray.patch new file mode 100644 index 0000000..f52004b --- /dev/null +++ b/SOURCES/nodejs-concat-stream-1.4.4-Remove-dependency-on-typedarray.patch @@ -0,0 +1,116 @@ +From 6f84bc49f32fb8c50b8a23e9277a693b18ad3e48 Mon Sep 17 00:00:00 2001 +From: Jamie Nguyen +Date: Thu, 13 Mar 2014 16:23:51 +0000 +Subject: [PATCH] Remove dependency on npm(typedarray) + +--- + index.js | 4 +--- + package.json | 3 +-- + test/buffer.js | 4 +--- + test/string.js | 4 +--- + test/typedarray.js | 8 +++----- + 5 files changed, 7 insertions(+), 16 deletions(-) + +diff --git a/index.js b/index.js +index f9da8d2..91d004e 100644 +--- a/index.js ++++ b/index.js +@@ -1,7 +1,5 @@ + var Writable = require('stream').Writable + var inherits = require('inherits') +-var TA = require('typedarray') +-var U8 = typeof Uint8Array !== 'undefined' ? Uint8Array : TA.Uint8Array + + function ConcatStream(opts, cb) { + if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb) +@@ -122,7 +120,7 @@ function u8Concat (parts) { + } + len += parts[i].length + } +- var u8 = new U8(len) ++ var u8 = new Uint8Array(len) + for (var i = 0, offset = 0; i < parts.length; i++) { + var part = parts[i] + for (var j = 0; j < part.length; j++) { +diff --git a/package.json b/package.json +index f84ce76..bf182f5 100644 +--- a/package.json ++++ b/package.json +@@ -25,8 +25,7 @@ + }, + "license": "MIT", + "dependencies": { +- "inherits": "~2.0.1", +- "typedarray": "~0.0.5" ++ "inherits": "~2.0.1" + }, + "devDependencies": { + "tape": "~2.3.2" +diff --git a/test/buffer.js b/test/buffer.js +index d28f5f9..b408158 100644 +--- a/test/buffer.js ++++ b/test/buffer.js +@@ -1,7 +1,5 @@ + var concat = require('../') + var test = require('tape') +-var TA = require('typedarray') +-var U8 = typeof Uint8Array !== 'undefined' ? Uint8Array : TA.Uint8Array + + test('buffer stream', function (t) { + t.plan(2) +@@ -23,7 +21,7 @@ test('buffer mixed writes', function (t) { + buffers.write(new Buffer('pizza')) + buffers.write(' Array is not a ') + buffers.write([ 115, 116, 114, 105, 110, 103, 121 ]) +- var u8 = new U8(4) ++ var u8 = new Uint8Array(4) + u8[0] = 32; u8[1] = 99; u8[2] = 97; u8[3] = 116 + buffers.write(u8) + buffers.write(555) +diff --git a/test/string.js b/test/string.js +index 1fccb61..3ce41b0 100644 +--- a/test/string.js ++++ b/test/string.js +@@ -1,7 +1,5 @@ + var concat = require('../') + var test = require('tape') +-var TA = require('typedarray') +-var U8 = typeof Uint8Array !== 'undefined' ? Uint8Array : TA.Uint8Array + + test('string -> buffer stream', function (t) { + t.plan(2) +@@ -44,7 +42,7 @@ test('string from mixed write encodings', function (t) { + strings.write('na') + strings.write(Buffer('cho')) + strings.write([ 32, 100 ]) +- var u8 = new U8(3) ++ var u8 = new Uint8Array(3) + u8[0] = 111; u8[1] = 103; u8[2] = 115; + strings.end(u8) + }) +diff --git a/test/typedarray.js b/test/typedarray.js +index ee07110..db24df1 100644 +--- a/test/typedarray.js ++++ b/test/typedarray.js +@@ -1,15 +1,13 @@ + var concat = require('../') + var test = require('tape') +-var TA = require('typedarray') +-var U8 = typeof Uint8Array !== 'undefined' ? Uint8Array : TA.Uint8Array + + test('typed array stream', function (t) { + t.plan(2) +- var a = new U8(5) ++ var a = new Uint8Array(5) + a[0] = 97; a[1] = 98; a[2] = 99; a[3] = 100; a[4] = 101; +- var b = new U8(3) ++ var b = new Uint8Array(3) + b[0] = 32; b[1] = 102; b[2] = 103; +- var c = new U8(4) ++ var c = new Uint8Array(4) + c[0] = 32; c[1] = 120; c[2] = 121; c[3] = 122; + + var arrays = concat({ encoding: 'Uint8Array' }, function(out) { +-- +1.8.5.3 + diff --git a/SOURCES/nodejs-concat-stream-1.4.4-Use-stream-from-Node.js-core.patch b/SOURCES/nodejs-concat-stream-1.4.4-Use-stream-from-Node.js-core.patch new file mode 100644 index 0000000..3ae8990 --- /dev/null +++ b/SOURCES/nodejs-concat-stream-1.4.4-Use-stream-from-Node.js-core.patch @@ -0,0 +1,37 @@ +From fecccf01809dff7ff0674e6d0ae1124183f19b3c Mon Sep 17 00:00:00 2001 +From: Jamie Nguyen +Date: Thu, 13 Mar 2014 16:15:30 +0000 +Subject: [PATCH] Use 'stream' from Node.js core + +--- + index.js | 2 +- + package.json | 3 +-- + 2 files changed, 2 insertions(+), 3 deletions(-) + +diff --git a/index.js b/index.js +index fce2ba9..f9da8d2 100644 +--- a/index.js ++++ b/index.js +@@ -1,4 +1,4 @@ +-var Writable = require('readable-stream').Writable ++var Writable = require('stream').Writable + var inherits = require('inherits') + var TA = require('typedarray') + var U8 = typeof Uint8Array !== 'undefined' ? Uint8Array : TA.Uint8Array +diff --git a/package.json b/package.json +index 7b5690c..f84ce76 100644 +--- a/package.json ++++ b/package.json +@@ -26,8 +26,7 @@ + "license": "MIT", + "dependencies": { + "inherits": "~2.0.1", +- "typedarray": "~0.0.5", +- "readable-stream": "~1.1.9" ++ "typedarray": "~0.0.5" + }, + "devDependencies": { + "tape": "~2.3.2" +-- +1.8.5.3 + diff --git a/SPECS/nodejs-concat-stream.spec b/SPECS/nodejs-concat-stream.spec new file mode 100644 index 0000000..b994b4c --- /dev/null +++ b/SPECS/nodejs-concat-stream.spec @@ -0,0 +1,84 @@ +%{?scl:%scl_package nodejs-concat-stream} +%{!?scl:%global pkg_name %{name}} + +%{?nodejs_find_provides_and_requires} + +%global enable_tests 0 + +Name: %{?scl_prefix}nodejs-concat-stream +Version: 1.4.4 +Release: 5%{?dist} +Summary: Writable stream that concatenates data and calls a callback with the result +License: MIT +Group: System Environment/Libraries +URL: https://github.com/maxogden/node-concat-stream +Source0: http://registry.npmjs.org/concat-stream/-/concat-stream-%{version}.tgz + +# Use 'stream' module from Node.js core instead of npm(readable-stream). +Patch0: %{pkg_name}-1.4.4-Use-stream-from-Node.js-core.patch +# npm(typedarray) is taken from https://github.com/inexorabletash/polyfill +# and is for supporting IE-9. But it appears that npm(concat-stream) only +# supports IE>=10 so there doesn't seem to be a compelling reason to use +# typedarray instead of a native `new Uint8Array(len)`. +Patch1: %{pkg_name}-1.4.4-Remove-dependency-on-typedarray.patch + +BuildArch: noarch +%if 0%{?fedora} >= 19 +ExclusiveArch: %{nodejs_arches} noarch +%else +ExclusiveArch: %{ix86} x86_64 %{arm} noarch +%endif + +BuildRequires: nodejs010-runtime + +%if 0%{?enable_tests} +BuildRequires: %{?scl_prefix}npm(inherits) +BuildRequires: %{?scl_prefix}npm(tape) +%endif + +%description +%{summary}. + +%prep +%setup -q -n package +%patch0 -p1 +%patch1 -p1 +%nodejs_fixdep inherits '~2.0.0' + +%build +#nothing to do + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/concat-stream +cp -pr package.json index.js \ + %{buildroot}%{nodejs_sitelib}/concat-stream + +%nodejs_symlink_deps + + +%if 0%{?enable_tests} + +%check +%nodejs_symlink_deps --check +/usr/bin/tape test/*.js test/server/*.js +%endif + +%files +%doc LICENSE readme.md +%{nodejs_sitelib}/concat-stream + +%changelog +* Tue Dec 01 2015 Tomas Hrcka - 1.4.4-5 +- Enable SCL macros + +* Wed Jun 17 2015 Fedora Release Engineering - 1.4.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 1.4.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Wed Mar 19 2014 Jamie Nguyen - 1.4.4-2 +- add missing BR: npm(inherits) + +* Thu Mar 13 2014 Jamie Nguyen - 1.4.4-1 +- initial package