%{?nodejs_find_provides_and_requires} %global packagename babel-code-frame %global enable_tests 1 Name: nodejs-babel-code-frame Version: 6.26.0 Release: 1%{?dist} Summary: Generate errors that contain a code frame that point to source locations License: MIT URL: https://github.com/babel/babel/tree/master/packages/babel-code-frame Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz Source1: https://raw.githubusercontent.com/babel/babel/v%{version}/LICENSE BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging BuildRequires: npm(babel-runtime) BuildRequires: npm(chalk) BuildRequires: npm(esutils) BuildRequires: npm(js-tokens) BuildRequires: npm(line-numbers) %if 0%{?enable_tests} BuildRequires: npm(tad) %endif %description Generate errors that contain a code frame that point to source locations. %prep %setup -q -n package cp -p %{SOURCE1} . %nodejs_fixdep babel-runtime %nodejs_fixdep repeating %build # nothing to do! %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json lib/ \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %{_bindir}/tad %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Sat Aug 19 2017 Jared Smith - 6.26.0-1 - Update to upstream 6.26.0 release * Thu Apr 13 2017 Jared Smith - 6.22.0-1 - Update to upstream 6.22.0 release * Wed Feb 17 2016 Jared Smith - 6.5.0-1 - Initial packaging