%{?nodejs_find_provides_and_requires} %global packagename coffee-errors %global enable_tests 0 # tests are failing, not sure why Name: nodejs-coffee-errors Version: 0.8.6 Release: 1%{?dist} Summary: Patches error stack to display correct line numbers License: MIT URL: https://github.com/alexgorbatchev/coffee-errors.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 %if 0%{?enable_tests} BuildRequires: npm(chai) BuildRequires: mocha %endif Requires: nodejs %description Patches error stack to display correct line numbers. CoffeeScript has built in support for this, but it only works when the script is executed through the `coffee` command. If you are running mocha, node-dev, jasmine or any other method, the functionality isn't on. %prep %setup -q -n package %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json *.js *.coffee \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check %{_bindir}/coffee --bare --compile *.coffee %{_bindir}/mocha -R spec test/*.spec.coffee %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license README.md %{nodejs_sitelib}/%{packagename} %changelog * Thu Nov 5 2015 Jared Smith - 0.8.6-1 - Initial packaging