[nodejs-component-emitter] Initial import

Jamie Nguyen jamielinux at fedoraproject.org
Tue Mar 11 17:12:51 UTC 2014


commit a7b9033b6bd576680d0fc2b974c0ff4899ec9c09
Author: Jamie Nguyen <j at jamielinux.com>
Date:   Tue Mar 11 17:12:36 2014 +0000

    Initial import

 .gitignore                    |    2 +
 LICENSE                       |   24 ++++++++++++++
 dl-tests.sh                   |   23 +++++++++++++
 nodejs-component-emitter.spec |   71 +++++++++++++++++++++++++++++++++++++++++
 sources                       |    2 +
 5 files changed, 122 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..d78d8ff 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,2 @@
+/component-emitter-1.1.2.tgz
+/tests-1.1.2.tar.bz2
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..de51692
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,24 @@
+(The MIT License)
+
+Copyright (c) 2014 Component contributors <dev at component.io>
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
diff --git a/dl-tests.sh b/dl-tests.sh
new file mode 100644
index 0000000..42b014f
--- /dev/null
+++ b/dl-tests.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+tag=1.1.2
+
+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/component/emitter.git
+cd emitter
+git archive --prefix="test/" --format=tar tags/${tag}:test/ \
+    | bzip2 > "$pwd"/tests-${tag}.tar.bz2
+popd
diff --git a/nodejs-component-emitter.spec b/nodejs-component-emitter.spec
new file mode 100644
index 0000000..4faf697
--- /dev/null
+++ b/nodejs-component-emitter.spec
@@ -0,0 +1,71 @@
+%{?nodejs_find_provides_and_requires}
+
+%global enable_tests 1
+
+Name:       nodejs-component-emitter
+Version:    1.1.2
+Release:    1%{?dist}
+Summary:    An event emitter component for Node.js
+License:    MIT
+Group:      System Environment/Libraries
+URL:        https://github.com/component/emitter
+Source0:    http://registry.npmjs.org/component-emitter/-/component-emitter-%{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-%{version}.tar.bz2
+Source10:   dl-tests.sh
+# Include a copy of the license text to comply with license requirements.
+Source20:   https://raw.github.com/component/emitter/2999c522a07ba3a95106530e1c1e194d2c7a266c/LICENSE
+
+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:  mocha
+BuildRequires:  npm(should)
+%endif
+
+%description
+%{summary}.
+
+
+%prep
+%setup -q -n package
+%setup -q -T -D -a 1 -n package
+cp -p %{SOURCE20} .
+
+
+%build
+#nothing to do
+
+
+%install
+mkdir -p %{buildroot}%{nodejs_sitelib}/component-emitter
+cp -pr package.json index.js \
+    %{buildroot}%{nodejs_sitelib}/component-emitter
+
+%nodejs_symlink_deps
+
+
+%if 0%{?enable_tests}
+%check
+%nodejs_symlink_deps --check
+/usr/bin/mocha --require should --reporter spec
+%endif
+
+
+%files
+%doc History.md LICENSE Readme.md
+%{nodejs_sitelib}/component-emitter
+
+
+%changelog
+* Sat Mar 08 2014 Jamie Nguyen <jamielinux at fedoraproject.org> - 1.1.2-1
+- initial package
diff --git a/sources b/sources
index e69de29..01a1ec2 100644
--- a/sources
+++ b/sources
@@ -0,0 +1,2 @@
+5211e83629806e439e98102d8d4f03a1  component-emitter-1.1.2.tgz
+9ac6aeb0e2ecbb9fac05da8fab251d87  tests-1.1.2.tar.bz2


More information about the scm-commits mailing list