Blob Blame Raw
%{?nodejs_find_provides_and_requires}

%global enable_tests 1

Name:       nodejs-has-color
Version:    0.1.7
Release:    1%{?dist}
Summary:    Detects whether a terminal supports color
License:    MIT
Group:      System Environment/Libraries
URL:        https://github.com/sindresorhus/has-color
Source0:    http://registry.npmjs.org/has-color/-/has-color-%{version}.tgz
Source1:    https://raw.githubusercontent.com/sindresorhus/has-color/ab671b1f74846d9fb9caea8dc302603a865be3cc/test.js
# https://github.com/sindresorhus/has-color/pull/4
Source2:    LICENSE

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)
%endif

%description
%{summary}.


%prep
%setup -q -n package
cp -p %{SOURCE1} .
cp -p %{SOURCE2} .


%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/has-color
cp -pr package.json index.js \
    %{buildroot}%{nodejs_sitelib}/has-color

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
/usr/bin/mocha
%endif


%files
%doc LICENSE readme.md
%{nodejs_sitelib}/has-color


%changelog
* Sun Apr 20 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.1.7-1
- update to upstream release 0.1.7

* Thu Mar 13 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.1.4-1
- initial package