%{?nodejs_find_provides_and_requires} %global enable_tests 0 Name: nodejs-ansi-styles Version: 2.1.0 Release: 6%{?dist} Summary: ANSI escape codes for colorizing strings in the terminal License: MIT Group: System Environment/Libraries URL: https://github.com/sindresorhus/ansi-styles Source0: http://registry.npmjs.org/ansi-styles/-/ansi-styles-%{version}.tgz # test file Source1: https://raw.githubusercontent.com/chalk/ansi-styles/v%{version}/test.js 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(mocha) BuildRequires: npm(chalk) BuildRequires: npm(require-uncached) %endif %description %{summary}. %prep %setup -q -n package cp -p %{SOURCE1} . %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/ansi-styles cp -pr package.json index.js \ %{buildroot}%{nodejs_sitelib}/ansi-styles %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} ln -s %{nodejs_sitelib}/chalk node_modules/chalk %{_bindir}/mocha -R spec %else %{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" %endif %files %{!?_licensedir:%global license %doc} %doc readme.md %license license %{nodejs_sitelib}/ansi-styles %changelog * Fri Jul 13 2018 Fedora Release Engineering - 2.1.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Thu Feb 08 2018 Fedora Release Engineering - 2.1.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Wed Jul 26 2017 Fedora Release Engineering - 2.1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Fri Feb 10 2017 Fedora Release Engineering - 2.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Feb 22 2016 Jared Smith - 2.1.0-2 - Update to upstream 2.1.0 release * Thu Feb 04 2016 Fedora Release Engineering - 1.0.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Wed Jun 17 2015 Fedora Release Engineering - 1.0.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 1.0.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Thu Mar 13 2014 Jamie Nguyen - 1.0.0-1 - initial package