# This macro is needed at the start for building on EL6 %{?nodejs_find_provides_and_requires} %global enable_tests 0 %global barename regenerator Name: nodejs-regenerator Version: 0.4.9 Release: 2%{?dist} Summary: Source transformer enabling ECMAScript 6 generators Group: Development/Libraries License: BSD URL: https://www.npmjs.org/package/regenerator Source0: http://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging >= 6 BuildRequires: npm(recast) BuildRequires: npm(defs) BuildRequires: npm(esprima) BuildRequires: npm(private) BuildRequires: npm(commander) Requires: npm(recast) Requires: npm(defs) Requires: npm(esprima) Requires: npm(private) Requires: npm(commander) %if 0%{?enable_tests} BuildRequires: npm(semver) BuildRequires: npm(mocha) %endif %description This package implements a fully-functional source transformation that takes the proposed syntax for generators/yield from future versions of JS (ECMAScript6 or ES6, experimentally implemented in Node.js v0.11) and spits out efficient JS-of-today (ES5) that behaves the same way. %prep %setup -q -n package # Remove bundled node_modules if there are any.. rm -rf node_modules/ %nodejs_fixdep esprima ~1.x %nodejs_fixdep --caret %nodejs_fixdep recast ~0.x %nodejs_fixdep defs x %build %nodejs_symlink_deps --build %install mkdir -p %{buildroot}%{nodejs_sitelib}/regenerator cp -pr package.json main.js lib \ %{buildroot}%{nodejs_sitelib}/regenerator %nodejs_symlink_deps %check %if 0%{?enable_tests} %nodejs_symlink_deps --check node test/run.js %endif %files %doc README.md LICENSE %{nodejs_sitelib}/regenerator/ %changelog * Tue Jul 22 2014 Ralph Bean - 0.4.9-2 - Initial packaging for Fedora.