c893a8
%{?nodejs_find_provides_and_requires}
c893a8
c893a8
%global enable_tests 1
c893a8
c893a8
Name:       nodejs-has-color
98abd3
Version:    0.1.7
c893a8
Release:    1%{?dist}
c893a8
Summary:    Detects whether a terminal supports color
c893a8
License:    MIT
c893a8
Group:      System Environment/Libraries
c893a8
URL:        https://github.com/sindresorhus/has-color
c893a8
Source0:    http://registry.npmjs.org/has-color/-/has-color-%{version}.tgz
98abd3
Source1:    https://raw.githubusercontent.com/sindresorhus/has-color/ab671b1f74846d9fb9caea8dc302603a865be3cc/test.js
c893a8
# https://github.com/sindresorhus/has-color/pull/4
c893a8
Source2:    LICENSE
c893a8
c893a8
BuildArch:  noarch
c893a8
%if 0%{?fedora} >= 19
c893a8
ExclusiveArch: %{nodejs_arches} noarch
c893a8
%else
c893a8
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
c893a8
%endif
c893a8
c893a8
BuildRequires:  nodejs-packaging
c893a8
c893a8
%if 0%{?enable_tests}
c893a8
BuildRequires:  npm(mocha)
c893a8
%endif
c893a8
c893a8
%description
c893a8
%{summary}.
c893a8
c893a8
c893a8
%prep
c893a8
%setup -q -n package
c893a8
cp -p %{SOURCE1} .
c893a8
cp -p %{SOURCE2} .
c893a8
c893a8
c893a8
%build
c893a8
#nothing to do
c893a8
c893a8
c893a8
%install
c893a8
mkdir -p %{buildroot}%{nodejs_sitelib}/has-color
98abd3
cp -pr package.json index.js \
c893a8
    %{buildroot}%{nodejs_sitelib}/has-color
c893a8
c893a8
%nodejs_symlink_deps
c893a8
c893a8
c893a8
%if 0%{?enable_tests}
c893a8
%check
c893a8
%nodejs_symlink_deps --check
c893a8
/usr/bin/mocha
c893a8
%endif
c893a8
c893a8
c893a8
%files
c893a8
%doc LICENSE readme.md
c893a8
%{nodejs_sitelib}/has-color
c893a8
c893a8
c893a8
%changelog
98abd3
* Sun Apr 20 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.1.7-1
98abd3
- update to upstream release 0.1.7
98abd3
c893a8
* Thu Mar 13 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.1.4-1
c893a8
- initial package