diff --git a/async-1.5.2.tar.gz b/async-1.5.2.tar.gz new file mode 100644 index 0000000..11b819c Binary files /dev/null and b/async-1.5.2.tar.gz differ diff --git a/nodejs-async.spec b/nodejs-async.spec new file mode 100644 index 0000000..0a142ab --- /dev/null +++ b/nodejs-async.spec @@ -0,0 +1,56 @@ +%{?nodejs_find_provides_and_requires} +%global enable_mocha_tests 1 +%global enable_nodeunit_tests 0 +Name: nodejs-async +Version: 1.5.2 +Release: 1 +Summary: Higher-order functions and common patterns for asynchronous code +License: MIT +URL: https://github.com/caolan/async/ +Source0: https://github.com/caolan/async/archive/v%{version}/async-%{version}.tar.gz +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch +BuildRequires: nodejs-packaging +%if 0%{?enable_mocha_tests} +BuildRequires: npm(mocha) npm(chai) +%endif +%if 0%{?enable_nodeunit_tests} +BuildRequires: npm(nodeunit) npm(bluebird) npm(es6-promise) npm(native-promise-only) npm(rsvp) +%endif +%description +Async is a utility module which provides straight-forward, powerful functions +for working with asynchronous JavaScript. Although originally designed for +use with Node.js, it can also be used directly in the browser. +Async provides around 20 functions that include the usual 'functional' +suspects (map, reduce, filter, forEach…) as well as some common patterns +for asynchronous control flow (parallel, series, waterfall…). All these +functions assume you follow the Node.js convention of providing a single +callback as the last argument of your async function. + +%prep +%setup -q -n async-%{version} + +%build + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/async +cp -pr package.json lib %{buildroot}%{nodejs_sitelib}/async + +%check +%nodejs_symlink_deps --check +%__nodejs -e "require('./')" +%if 0%{?enable_mocha_tests} +%{nodejs_sitelib}/mocha/bin/mocha mocha_test +%endif +%if 0%{?enable_nodeunit_tests} +%{nodejs_sitelib}/nodeunit/bin/nodeunit test/test-async.js +%endif + +%files +%doc README.md CHANGELOG.md +%license LICENSE +%{nodejs_sitelib}/async + +%changelog +* Mon Aug 17 2020 Shaoqiang Kang - 1.5.2-1 +- Package init diff --git a/nodejs-async.yaml b/nodejs-async.yaml new file mode 100644 index 0000000..52353a1 --- /dev/null +++ b/nodejs-async.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: caolan/async +tag_prefix: "v" +seperator: "."