# This macro is needed at the start for building on EL6 %{?nodejs_find_provides_and_requires} %global barename supports-color %global enable_tests 0 # tests disabled until such time as 'ava' is packaged in Fedora Name: nodejs-supports-color Version: 3.1.2 Release: 1%{?dist} Summary: Detect whether a terminal supports color Group: Development/Libraries License: MIT URL: https://github.com/chalk/supports-color Source0: http://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz Source1: https://raw.githubusercontent.com/chalk/supports-color/d9e363732f48ad2bc6b936357246b55e136aa989/test.js BuildArch: noarch %if 0%{?fedora} >= 19 ExclusiveArch: %{nodejs_arches} noarch %else ExclusiveArch: %{ix86} x86_64 %{arm} noarch %endif BuildRequires: nodejs-packaging >= 6 %if 0%{?enable_tests} BuildRequires: npm(require-uncached) BuildRequires: npm(mocha) BuildRequires: npm(has-flag) %endif %description Detect whether a terminal supports color %prep %setup -q -n package cp %{SOURCE1} . # Remove bundled node_modules if there are any.. rm -rf node_modules/ %nodejs_fixdep --caret %build # This causes warnings when running the tests #%nodejs_symlink_deps --build %install mkdir -p %{buildroot}%{nodejs_sitelib}/supports-color cp -pr package.json *.js \ %{buildroot}%{nodejs_sitelib}/supports-color mkdir -p %{buildroot}/%{_bindir}/ ln -s %{nodejs_sitelib}/supports-color/cli.js \ %{buildroot}/%{_bindir}/supports-color %nodejs_symlink_deps %check %if 0%{?enable_tests} %nodejs_symlink_deps --check mocha -R spec %endif %files %{!?_licensedir:%global license %doc} %license license %doc readme.md %{nodejs_sitelib}/supports-color/ %{_bindir}/supports-color %changelog * Thu Oct 22 2015 Jared Smith - 3.1.2-1 - Update to upstream 3.1.2 release * Wed Jun 17 2015 Fedora Release Engineering - 1.2.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Tue Feb 10 2015 Ralph Bean - 1.2.0-2 - Include license from github. - Enable tests. - Make cli.js into a symlink. - Comment out nodejs_symlink_deps --build, as per review. * Tue Dec 02 2014 Ralph Bean - 1.2.0-1 - Initial packaging for Fedora.