diff --git a/nodejs-promise.spec b/nodejs-promise.spec new file mode 100644 index 0000000..33e7a35 --- /dev/null +++ b/nodejs-promise.spec @@ -0,0 +1,69 @@ +%{?nodejs_find_provides_and_requires} + +%global enable_tests 1 + +Name: nodejs-promise +Version: 8.0.1 +Release: 1 +Summary: Bare bones Promises/A+ implementation for Node.js +License: MIT +URL: https://github.com/then/promise +Source0: http://registry.npmjs.org/promise/-/promise-%{version}.tgz +#git clone git://github.com/then/promise.git +#cd promise +#git archive --prefix="test/" --format=tar tags/${tag}:test/ \ +# | bzip2 > "$pwd"/tests-${tag}.tar.bz2 +Source1: tests-%{version}.tar.bz2 + +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch + +BuildRequires: nodejs-packaging + +%if 0%{?enable_tests} +BuildRequires: mocha npm(asap) npm(better-assert) npm(promises-aplus-tests) +%endif + +%description +This is a bare bones Promises/A+ implementation for Node.js. It is designed +to get the basics spot on correct, so that you can build extended promise +implementations on top of it. + + +%prep +%setup -q -n package +%setup -q -T -D -a 1 -n package +%nodejs_fixdep asap "^2.0.3" + +%build +#nothing to do + + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/promise +cp -pr package.json *.js lib/ domains/ setimmediate/ \ + %{buildroot}%{nodejs_sitelib}/promise + +%nodejs_symlink_deps + + +%check +%nodejs_symlink_deps --check +%{__nodejs} -e 'require("./")' +%if 0%{?enable_tests} +%{_bindir}/mocha -R spec --timeout 200 --slow 99999 +%else +%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" +%endif + + +%files +%{!?_licensedir:%global license %doc} +%doc Readme.md +%license LICENSE +%{nodejs_sitelib}/promise + + +%changelog +* Wed Aug 19 2020 wangxiao - 8.0.1-1 +- package init diff --git a/nodejs-promise.yaml b/nodejs-promise.yaml new file mode 100644 index 0000000..a02568c --- /dev/null +++ b/nodejs-promise.yaml @@ -0,0 +1,5 @@ +git_url: https://github.com/then/promise +version_control: github +src_repo: then/promise +tag_prefix: "" +seperator: "." diff --git a/promise-8.0.1.tgz b/promise-8.0.1.tgz new file mode 100644 index 0000000..d094980 Binary files /dev/null and b/promise-8.0.1.tgz differ diff --git a/tests-8.0.1.tar.bz2 b/tests-8.0.1.tar.bz2 new file mode 100644 index 0000000..f5388b3 Binary files /dev/null and b/tests-8.0.1.tar.bz2 differ