From 3b52d49669d3ed982063719cd86fa5e41fcef891 Mon Sep 17 00:00:00 2001 From: Jared K. Smith Date: Jul 08 2016 18:17:59 +0000 Subject: Initial packaging --- diff --git a/nodejs-each.spec b/nodejs-each.spec new file mode 100644 index 0000000..5a3123f --- /dev/null +++ b/nodejs-each.spec @@ -0,0 +1,83 @@ +%{?nodejs_find_provides_and_requires} + +%global packagename each +%global enable_tests 1 + +Name: nodejs-each +Version: 0.6.1 +Release: 2%{?dist} +Summary: Chained and parallel async iterator in one elegant function + +License: BSD +URL: https://github.com/wdavidw/node-each.git +Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz + +BuildArch: noarch +%if 0%{?fedora} >= 19 +ExclusiveArch: %{nodejs_arches} noarch +%else +ExclusiveArch: %{ix86} x86_64 %{arm} noarch +%endif + +BuildRequires: nodejs-packaging +BuildRequires: coffee-script + +%if 0%{?enable_tests} +BuildRequires: mocha +BuildRequires: npm(should) +%endif + +%description +Chained and parallel async iterator in one elegant function + + +%prep +%setup -q -n package + +# remove pre-compiled script +rm lib/*.js + +%nodejs_fixdep glob "^6.0.0" + + +%build +%{_bindir}/coffee -c -b -o lib/ src/ + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} +cp -pr package.json *.js lib/ \ + %{buildroot}%{nodejs_sitelib}/%{packagename} + +%nodejs_symlink_deps + +%if 0%{?enable_tests} +%check +%nodejs_symlink_deps --check +%{__nodejs} -e 'require("./")' +NODE_ENV=test %{_bindir}/mocha --compilers coffee:coffee-script/register -R spec +%endif + + +%files +%{!?_licensedir:%global license %doc} +%doc *.md samples/ doc/ +%license LICENSE +%{nodejs_sitelib}/%{packagename} + + + +%changelog +* Mon Jul 04 2016 Jared Smith - 0.6.1-2 +- Add fixdep to npm(glob) dependency + +* Sun Jul 03 2016 Jared Smith - 0.6.1-1 +- Update to upstream 0.6.1 release + +* Wed Nov 11 2015 Jared Smith - 0.5.2-4 +- Increase timeout for mocha in tests + +* Sun Nov 08 2015 Jared Smith - 0.5.2-2 +- Try working around a problem in coffee-script packaging + +* Sun Nov 8 2015 Jared Smith - 0.5.2-1 +- Initial packaging