# This macro is needed at the start for building on EL6 %{?nodejs_find_provides_and_requires} %global enable_tests 0 %global barename supports-color Name: nodejs-supports-color Version: 1.2.0 Release: 1%{?dist} Summary: Detect whether a terminal supports color Group: Development/Libraries License: MIT URL: https://www.npmjs.org/package/supports-color 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 %if 0%{?enable_tests} BuildRequires: npm(require-uncached) BuildRequires: npm(mocha) %endif %description Detect whether a terminal supports color %prep %setup -q -n package # Remove bundled node_modules if there are any.. rm -rf node_modules/ %nodejs_fixdep --caret %build %nodejs_symlink_deps --build %install mkdir -p %{buildroot}%{nodejs_sitelib}/supports-color cp -pr package.json index.js \ %{buildroot}%{nodejs_sitelib}/supports-color mkdir -p %{buildroot}/%{_bindir}/ cp -pr cli.js %{buildroot}/%{_bindir}/supports-color %nodejs_symlink_deps %check %if 0%{?enable_tests} %nodejs_symlink_deps --check mocha %endif %files # The license is MIT, but it is not included in the tarball. # I have asked the author before if he would include the license with other # projects, and he declined. I don't want to pester him again... # https://github.com/sindresorhus/supports-color/blob/master/license#L12-L13 %doc readme.md %{nodejs_sitelib}/supports-color/ %{_bindir}/supports-color %changelog * Tue Dec 02 2014 Ralph Bean - 1.2.0-1 - Initial packaging for Fedora.