48 lines
1.2 KiB
RPMSpec
48 lines
1.2 KiB
RPMSpec
|
|
%{?nodejs_find_provides_and_requires}
|
||
|
|
%global enable_tests 1
|
||
|
|
Name: nodejs-has-color
|
||
|
|
Version: 0.1.7
|
||
|
|
Release: 1
|
||
|
|
Summary: Detects whether a terminal supports color
|
||
|
|
License: MIT
|
||
|
|
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://opensource.org.licenses/MIT
|
||
|
|
Source2: LICENSE
|
||
|
|
BuildArch: noarch
|
||
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
||
|
|
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
|
||
|
|
|
||
|
|
%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
|
||
|
|
* Thu Aug 20 2020 wangxiao <wangxiao65@huawei.com> - 0.1.7-1
|
||
|
|
- Package init
|