From e432491f6fe1a2c05de5f2f5b104b5cd04a71577 Mon Sep 17 00:00:00 2001 From: Jamie Nguyen Date: Jun 24 2013 23:05:53 +0000 Subject: Initial import --- diff --git a/.gitignore b/.gitignore index e69de29..097a44d 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,2 @@ +/q-0.9.6.tgz +/tests-v0.9.6.tar.bz2 diff --git a/dl-tests.sh b/dl-tests.sh new file mode 100644 index 0000000..3c259c0 --- /dev/null +++ b/dl-tests.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +tag=v0.9.6 + +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/kriskowal/q.git +cd q +git archive --prefix="spec/" --format=tar tags/${tag}:spec/ \ + | bzip2 > "$pwd"/tests-${tag}.tar.bz2 +popd diff --git a/nodejs-q.spec b/nodejs-q.spec new file mode 100644 index 0000000..ffa4c93 --- /dev/null +++ b/nodejs-q.spec @@ -0,0 +1,82 @@ +%{?nodejs_find_provides_and_requires} + +%global enable_tests 0 + +Name: nodejs-q +Version: 0.9.6 +Release: 1%{?dist} +Summary: A tool for making and composing asynchronous promises in JavaScript +# q.js appears to contain both MIT and ASL 2.0 licensed code +License: MIT and ASL 2.0 +Group: System Environment/Libraries +URL: https://github.com/kriskowal/q +Source0: http://registry.npmjs.org/q/-/q-%{version}.tgz +# Source1 is generated by running Source10, which pulls from the upstream +# revision control repository. +Source1: tests-v%{version}.tar.bz2 +Source10: dl-tests.sh +BuildArch: noarch + +BuildRequires: nodejs-devel + +%if 0%{?enable_tests} +BuildRequires: npm(jasmine-node) +BuildRequires: npm(promises-aplus-tests) +%endif + +%description +Q is a tool for making and composing asynchronous promises in JavaScript. + +If a function cannot return a value or throw an exception without blocking, +it can return a promise instead. A promise is an object that represents the +return value or the thrown exception that the function may eventually provide. +A promise can also be used as a proxy for a remote object to overcome latency. + +Q can exchange promises with jQuery, Dojo, When.js, WinJS, and more. +Additionally, there are many libraries that produce and consume Q promises for +everything from file system/database access or RPC to templating. + + +%prep +%setup -q -n package +%setup -q -D -T -a 1 -n package + + +%build +#nothing to do + + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/q +cp -pr package.json q.js queue.js \ + %{buildroot}%{nodejs_sitelib}/q + +%nodejs_symlink_deps + + +%if 0%{?enable_tests} +%check +%{nodejs_sitelib}/jasmine-node/bin/jasmine-node spec +%{nodejs_sitelib}/promises-aplus-tests/bin/promises-aplus-tests \ + spec/aplus-adapter +%endif + +%files +%doc CONTRIBUTING.md LICENSE README.md +%{nodejs_sitelib}/q + + +%changelog +* Fri Jun 21 2013 Jamie Nguyen - 0.9.6-1 +- update to upstream release 0.9.6 +- add %%check and related BR + +* Sun May 26 2013 Jamie Nguyen - 0.9.4-1 +- update to upstream release 0.9.4 +- upstream have now included a copy of the MIT license + +* Fri Feb 22 2013 Jamie Nguyen - 0.8.12-2 +- add a copy of the MIT license from upstream while waiting for the next release + +* Wed Feb 13 2013 Jamie Nguyen - 0.8.12-1 +- initial package diff --git a/sources b/sources index e69de29..57a115b 100644 --- a/sources +++ b/sources @@ -0,0 +1,2 @@ +126e1af63ffb45664e0b2b1d569ce1be q-0.9.6.tgz +0def9c55599aee6bb28d8c491dec89d5 tests-v0.9.6.tar.bz2