[nodejs-weak-map] Initial import

Jamie Nguyen jamielinux at fedoraproject.org
Mon Jun 30 17:17:29 UTC 2014


commit 2823c9aae909259a974d3ae7dbea89c5fccedd6f
Author: Jamie Nguyen <j at jamielinux.com>
Date:   Mon Jun 30 18:17:24 2014 +0100

    Initial import

 .gitignore           |    2 +
 dl-tests.sh          |   23 ++++++++++++++
 nodejs-weak-map.spec |   80 ++++++++++++++++++++++++++++++++++++++++++++++++++
 sources              |    2 +
 4 files changed, 107 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..f51e51c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/tests-v1.0.5.tar.bz2
+/weak-map-1.0.5.tgz
diff --git a/dl-tests.sh b/dl-tests.sh
new file mode 100644
index 0000000..24d82e7
--- /dev/null
+++ b/dl-tests.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+tag=v1.0.5
+
+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/drses/weak-map.git
+cd weak-map
+git archive --prefix="test/" --format=tar tags/${tag}:test/ \
+    | bzip2 > "$pwd"/tests-${tag}.tar.bz2
+popd
diff --git a/nodejs-weak-map.spec b/nodejs-weak-map.spec
new file mode 100644
index 0000000..02715cf
--- /dev/null
+++ b/nodejs-weak-map.spec
@@ -0,0 +1,80 @@
+%{?nodejs_find_provides_and_requires}
+
+%global enable_tests 0
+
+Name:       nodejs-weak-map
+Version:    1.0.5
+Release:    1%{?dist}
+Summary:    A WeakMap shim for Node.js and browsers
+License:    ASL 2.0
+Group:      System Environment/Libraries
+URL:        https://github.com/drses/weak-map
+Source0:    http://registry.npmjs.org/weak-map/-/weak-map-%{version}.tgz
+# 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
+
+%description
+WeakMap is a collection introduced to JavaScript with EcmaScript 6. It
+provides a mapping from objects to values, but allows any entry to be
+garbage collected if the key is provably lost.
+
+In order for it to be possible that a key is provably lost, weak maps
+do not provide a way to access the key list.
+
+This is a Node.js module that provides a shim and patcher for missing
+or broken WeakMap implementations, suitable for use in Node.js and
+browsers that provide the EcmaScript 5 property description interfaces.
+
+
+%prep
+%setup -q -n package
+%setup -q -T -D -a 1 -n package
+
+
+%build
+#nothing to do
+
+
+%install
+mkdir -p %{buildroot}%{nodejs_sitelib}/weak-map
+cp -pr package.json weak-map.js \
+    %{buildroot}%{nodejs_sitelib}/weak-map
+
+%nodejs_symlink_deps
+
+
+%if 0%{?enable_tests}
+%check
+%nodejs_symlink_deps --check
+#  /usr/bin/npm install jasminum@^2.0.1
+#  mkdir -p node_modules/jasminum/node_modules/collections/node_modules
+#  ln -sf %%{_builddir}/package \
+#     node_modules/jasminum/node_modules/collections/node_modules/weak-map
+%__nodejs --harmony_collections test/index.js
+%__nodejs test/index.js
+%endif
+
+
+%files
+%doc README.md
+%{nodejs_sitelib}/weak-map
+
+
+%changelog
+* Sat Jun 28 2014 Jamie Nguyen <jamielinux at fedoraproject.org> - 1.0.5-1
+- update to upstream release 1.0.5
+- tests have been removed from NPM tarball so download separately
+
+* Sat Apr 19 2014 Jamie Nguyen <jamielinux at fedoraproject.org> - 1.0.4-1
+- initial package
diff --git a/sources b/sources
index e69de29..9c3a1f1 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+aa2c599f6f1de1dd6fb91851dd71a769  tests-v1.0.5.tar.bz2
+e73b00c039e8fc9dee7cbe7466426aa4  weak-map-1.0.5.tgz


More information about the scm-commits mailing list