[nodejs-crc32-stream] Initial import (#1176887).

piotrp piotrp at fedoraproject.org
Wed Dec 24 12:24:13 UTC 2014


commit a3686376fc106f27501c6fe05f359a64ba003866
Author: Piotr Popieluch <piotr1212 at gmail.com>
Date:   Wed Dec 24 13:23:49 2014 +0100

    Initial import (#1176887).

 .gitignore                      |    2 +
 nodejs-crc32-stream-dl-tests.sh |   23 +++++++++++++
 nodejs-crc32-stream.spec        |   69 +++++++++++++++++++++++++++++++++++++++
 sources                         |    2 +
 4 files changed, 96 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..4bc6e83 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/crc32-stream-0.3.1.tgz
+/nodejs-crc32-stream-tests-0.3.1.tar.bz2
diff --git a/nodejs-crc32-stream-dl-tests.sh b/nodejs-crc32-stream-dl-tests.sh
new file mode 100755
index 0000000..1342803
--- /dev/null
+++ b/nodejs-crc32-stream-dl-tests.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+tag=0.3.1
+
+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 https://github.com/ctalkington/node-crc32-stream.git
+cd node-crc32-stream
+git archive --format=tar tags/${tag} test/ \
+    | bzip2 > "$pwd"/nodejs-crc32-stream-tests-${tag}.tar.bz2
+popd
diff --git a/nodejs-crc32-stream.spec b/nodejs-crc32-stream.spec
new file mode 100644
index 0000000..fffbdc7
--- /dev/null
+++ b/nodejs-crc32-stream.spec
@@ -0,0 +1,69 @@
+%global enable_tests 1
+%global srcname crc32-stream
+
+Name:           nodejs-%{srcname}
+Version:        0.3.1
+Release:        1%{?dist}
+Summary:        A streaming CRC32 checksumer
+License:        MIT
+URL:            https://github.com/ctalkington/node-crc32-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-%{version}.tar.bz2
+Source10:       %{name}-dl-tests.sh
+
+BuildArch:      noarch
+ExclusiveArch:  %{nodejs_arches} noarch
+
+BuildRequires:  nodejs-packaging
+BuildRequires:  dos2unix
+
+%if 0%{?enable_tests}
+BuildRequires:  npm(mocha)
+BuildRequires:  npm(chai)
+BuildRequires:  npm(readable-stream)
+BuildRequires:  npm(buffer-crc32)
+%endif
+
+
+%description
+crc32-stream is a streaming CRC32 checksumer. It uses buffer-crc32 behind the 
+scenes to reliably handle binary data and fancy character sets. Data is passed 
+through untouched.
+
+
+%prep
+%setup -q -n package
+%setup -q -T -D -a 1 -n package
+rm -rf node_modules/
+dos2unix README.md LICENSE-MIT
+%nodejs_fixdep readable-stream ^1.1
+
+
+%build
+#nothing to do
+
+
+%install
+mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
+cp -pr package.json lib/ %{buildroot}%{nodejs_sitelib}/%{srcname}
+%nodejs_symlink_deps
+
+
+%if 0%{?enable_tests}
+%check
+%nodejs_symlink_deps --check
+mocha --reporter dot
+%endif
+
+
+%files
+%doc README.md LICENSE-MIT
+%{nodejs_sitelib}/%{srcname}
+
+
+%changelog
+* Mon Dec 22 2014 Piotr Popieluch <piotr1212 at gmail.com> - 0.3.1-1
+- Initial package
diff --git a/sources b/sources
index e69de29..206682d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+273bf0e44964c0d1b97484d8acb2cfa8  crc32-stream-0.3.1.tgz
+13e1b2ead7e85179da97b1a925324d3a  nodejs-crc32-stream-tests-0.3.1.tar.bz2


More information about the scm-commits mailing list