# This macro is needed at the start for building on EL6 %{?nodejs_find_provides_and_requires} %global enable_tests 0 %global barename es6-transpiler Name: nodejs-es6-transpiler Version: 0.7.8 Release: 2%{?dist} Summary: es6 -> es5 Group: Development/Libraries License: MIT URL: https://www.npmjs.org/package/es6-transpiler 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(simple-fmt) BuildRequires: npm(ansidiff) BuildRequires: npm(es5-shim) BuildRequires: npm(stringmap) BuildRequires: npm(stringset) BuildRequires: npm(simple-is) # These are automatically required #Requires: npm(simple-fmt) #Requires: npm(ansidiff) #Requires: npm(es5-shim) #Requires: npm(stringmap) #Requires: npm(stringset) #Requires: npm(simple-is) %description es6 -> es5 %prep %setup -q -n package # Remove bundled node_modules if there are any.. rm -rf node_modules/ %nodejs_fixdep --caret %nodejs_fixdep es5-shim '>2' %build %nodejs_symlink_deps --build %install mkdir -p %{buildroot}%{nodejs_sitelib}/es6-transpiler cp -pr package.json es6-transpiler.js run-tests.js lib options.js \ %{buildroot}%{nodejs_sitelib}/es6-transpiler mkdir -p %{buildroot}/%{_bindir} cp -pr es6toes5 %{buildroot}/%{_bindir}/es6toes5 chmod +x %{buildroot}/%{_bindir}/es6toes5 %nodejs_symlink_deps %check %if 0%{?enable_tests} %nodejs_symlink_deps --check node --harmony run-tests %endif %files %doc LICENSE README.md %{nodejs_sitelib}/es6-transpiler/ %{_bindir}/es6toes5 %changelog * Mon Dec 01 2014 Ralph Bean - 0.7.8-2 - Comment out automatic requires. - Fixdep on es5-shim. - Set executable bit on es6toes5. * Mon Sep 15 2014 Ralph Bean - 0.7.8-1 - Initial packaging for Fedora.