|
|
1a199e4 |
# This macro is needed at the start for building on EL6
|
|
|
1a199e4 |
%{?nodejs_find_provides_and_requires}
|
|
|
1a199e4 |
|
|
|
1a199e4 |
%global barename supports-color
|
|
Jared K. Smith |
f08371d |
%global enable_tests 0
|
|
Jared K. Smith |
f08371d |
# tests disabled until such time as 'ava' is packaged in Fedora
|
|
Jared K. Smith |
f08371d |
|
|
|
1a199e4 |
|
|
|
1a199e4 |
Name: nodejs-supports-color
|
|
Jared K. Smith |
f08371d |
Version: 4.4.0
|
|
|
c382d75 |
Release: 3%{?dist}
|
|
|
1a199e4 |
Summary: Detect whether a terminal supports color
|
|
|
1a199e4 |
|
|
|
1a199e4 |
Group: Development/Libraries
|
|
|
1a199e4 |
License: MIT
|
|
Jared K. Smith |
f08371d |
URL: https://github.com/chalk/supports-color
|
|
|
1a199e4 |
Source0: http://registry.npmjs.org/%{barename}/-/%{barename}-%{version}.tgz
|
|
|
1a199e4 |
|
|
Jared K. Smith |
ffbf0b0 |
# 4.4.0 release hasn't been tagged in github yet
|
|
Jared K. Smith |
ffbf0b0 |
#Source1: https://raw.githubusercontent.com/chalk/supports-color/v%{version}/test.js
|
|
Jared K. Smith |
ffbf0b0 |
Source1: https://raw.githubusercontent.com/chalk/supports-color/master/test.js
|
|
|
1a199e4 |
|
|
|
1a199e4 |
BuildArch: noarch
|
|
|
1a199e4 |
%if 0%{?fedora} >= 19
|
|
|
1a199e4 |
ExclusiveArch: %{nodejs_arches} noarch
|
|
|
1a199e4 |
%else
|
|
|
1a199e4 |
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
|
|
1a199e4 |
%endif
|
|
|
1a199e4 |
|
|
|
1a199e4 |
BuildRequires: nodejs-packaging >= 6
|
|
Jared K. Smith |
7102686 |
BuildRequires: npm(has-flag)
|
|
|
1a199e4 |
|
|
|
1a199e4 |
%if 0%{?enable_tests}
|
|
|
1a199e4 |
BuildRequires: npm(require-uncached)
|
|
|
1a199e4 |
BuildRequires: npm(mocha)
|
|
|
1a199e4 |
%endif
|
|
|
1a199e4 |
|
|
|
1a199e4 |
|
|
|
1a199e4 |
%description
|
|
|
1a199e4 |
Detect whether a terminal supports color
|
|
|
1a199e4 |
|
|
|
1a199e4 |
%prep
|
|
|
1a199e4 |
%setup -q -n package
|
|
|
1a199e4 |
cp %{SOURCE1} .
|
|
|
1a199e4 |
|
|
|
1a199e4 |
# Remove bundled node_modules if there are any..
|
|
|
1a199e4 |
rm -rf node_modules/
|
|
|
1a199e4 |
|
|
|
1a199e4 |
%nodejs_fixdep --caret
|
|
|
1a199e4 |
|
|
|
1a199e4 |
%build
|
|
|
1a199e4 |
# This causes warnings when running the tests
|
|
|
1a199e4 |
#%nodejs_symlink_deps --build
|
|
|
1a199e4 |
|
|
|
1a199e4 |
%install
|
|
|
1a199e4 |
mkdir -p %{buildroot}%{nodejs_sitelib}/supports-color
|
|
Jared K. Smith |
f08371d |
cp -pr package.json *.js \
|
|
|
1a199e4 |
%{buildroot}%{nodejs_sitelib}/supports-color
|
|
|
1a199e4 |
|
|
|
1a199e4 |
mkdir -p %{buildroot}/%{_bindir}/
|
|
|
1a199e4 |
ln -s %{nodejs_sitelib}/supports-color/cli.js \
|
|
|
1a199e4 |
%{buildroot}/%{_bindir}/supports-color
|
|
|
1a199e4 |
|
|
|
1a199e4 |
%nodejs_symlink_deps
|
|
|
1a199e4 |
|
|
|
1a199e4 |
%check
|
|
|
1a199e4 |
%nodejs_symlink_deps --check
|
|
Jared K. Smith |
ffbf0b0 |
%{__nodejs} -e 'require("./")'
|
|
Jared K. Smith |
ffbf0b0 |
%if 0%{?enable_tests}
|
|
Jared K. Smith |
ffbf0b0 |
%{_bindir}/mocha -R spec
|
|
Jared K. Smith |
ffbf0b0 |
%else
|
|
Jared K. Smith |
ffbf0b0 |
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
|
|
|
1a199e4 |
%endif
|
|
|
1a199e4 |
|
|
|
1a199e4 |
%files
|
|
Jared K. Smith |
f08371d |
%{!?_licensedir:%global license %doc}
|
|
|
1a199e4 |
%license license
|
|
|
1a199e4 |
%doc readme.md
|
|
|
1a199e4 |
%{nodejs_sitelib}/supports-color/
|
|
|
1a199e4 |
%{_bindir}/supports-color
|
|
|
1a199e4 |
|
|
|
1a199e4 |
%changelog
|
|
|
c382d75 |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-3
|
|
|
c382d75 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
c382d75 |
|
|
|
eedc04c |
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.4.0-2
|
|
|
eedc04c |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
eedc04c |
|
|
Jared K. Smith |
f08371d |
* Wed Sep 20 2017 Jared Smith <jsmith@fedoraproject.org> - 4.4.0-1
|
|
Jared K. Smith |
f08371d |
- Update to upstream 4.4.0 release
|
|
Jared K. Smith |
f08371d |
|
|
|
6dd01ed |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-6
|
|
|
6dd01ed |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
6dd01ed |
|
|
|
d79e250 |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-5
|
|
|
d79e250 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
d79e250 |
|
|
|
6e57e0f |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.2.0-4
|
|
|
6e57e0f |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
6e57e0f |
|
|
|
8b322f7 |
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-3
|
|
|
8b322f7 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
8b322f7 |
|
|
|
1a199e4 |
* Tue Feb 10 2015 Ralph Bean <rbean@redhat.com> - 1.2.0-2
|
|
|
1a199e4 |
- Include license from github.
|
|
|
1a199e4 |
- Enable tests.
|
|
|
1a199e4 |
- Make cli.js into a symlink.
|
|
|
1a199e4 |
- Comment out nodejs_symlink_deps --build, as per review.
|
|
|
1a199e4 |
|
|
|
1a199e4 |
* Tue Dec 02 2014 Ralph Bean <rbean@redhat.com> - 1.2.0-1
|
|
|
1a199e4 |
- Initial packaging for Fedora.
|