Jared K. Smith 2cff116
%{?nodejs_find_provides_and_requires}
Jared K. Smith 2cff116
Jared K. Smith 2cff116
%global packagename is-finite
Jared K. Smith 2cff116
Jared K. Smith 2cff116
%global enable_tests 0
Jared K. Smith 2cff116
# Tests disabled until 'ava' is packaged in Fedora
Jared K. Smith 2cff116
# See https://bugzilla.redhat.com/show_bug.cgi?id=1194923
Jared K. Smith 2cff116
Jared K. Smith 2cff116
Name:		nodejs-is-finite
Jared K. Smith 2cff116
Version:	1.0.1
11da751
Release:	9%{?dist}
Jared K. Smith 2cff116
Summary:	ES6 Number.isFinite() ponyfill
Jared K. Smith 2cff116
Jared K. Smith 2cff116
License:	MIT
Jared K. Smith 2cff116
URL:		https://github.com/sindresorhus/is-finite.git
Jared K. Smith 2cff116
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
Jared K. Smith 2cff116
# The test files are not included in the npm tarball.
Jared K. Smith 2cff116
Source1:	https://raw.githubusercontent.com/sindresorhus/is-finite/%{version}/test.js
Jared K. Smith 2cff116
Jared K. Smith 2cff116
ExclusiveArch:	%{nodejs_arches} noarch
Jared K. Smith 2cff116
BuildArch:	noarch
Jared K. Smith 2cff116
Jared K. Smith 2cff116
BuildRequires:	nodejs-packaging
Jared K. Smith 2cff116
%if 0%{?enable_tests}
Jared K. Smith 2cff116
BuildRequires:	npm(ava)
Jared K. Smith 2cff116
%endif
Jared K. Smith 2cff116
Jared K. Smith 2cff116
%description
Jared K. Smith 2cff116
ES6 Number.isFinite() ponyfill
Jared K. Smith 2cff116
Jared K. Smith 2cff116
Jared K. Smith 2cff116
%prep
Jared K. Smith 2cff116
%setup -q -n package
Jared K. Smith 2cff116
# setup the tests
Jared K. Smith 2cff116
cp -p %{SOURCE1} .
Jared K. Smith 2cff116
Jared K. Smith 2cff116
Jared K. Smith 2cff116
%build
Jared K. Smith 2cff116
# nothing to do!
Jared K. Smith 2cff116
Jared K. Smith 2cff116
%install
Jared K. Smith 2cff116
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith 2cff116
cp -pr package.json *.js \
Jared K. Smith 2cff116
	%{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith 2cff116
Jared K. Smith 2cff116
%nodejs_symlink_deps
Jared K. Smith 2cff116
Jared K. Smith 2cff116
%check
Jared K. Smith 2cff116
%nodejs_symlink_deps --check
Jared K. Smith 2cff116
%if 0%{?enable_tests}
Jared K. Smith 2cff116
%{_bindir}/ava
Jared K. Smith 2cff116
%else
Jared K. Smith 2cff116
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
Jared K. Smith 2cff116
%endif
Jared K. Smith 2cff116
Jared K. Smith 2cff116
Jared K. Smith 2cff116
%files
Jared K. Smith 2cff116
%{!?_licensedir:%global license %doc}
Jared K. Smith 2cff116
%doc *.md
Jared K. Smith 2cff116
%license license
Jared K. Smith 2cff116
%{nodejs_sitelib}/%{packagename}
Jared K. Smith 2cff116
Jared K. Smith 2cff116
Jared K. Smith 2cff116
Jared K. Smith 2cff116
%changelog
11da751
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-9
11da751
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
11da751
d748941
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-8
d748941
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
d748941
dbe8160
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-7
dbe8160
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
dbe8160
94654f1
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-6
94654f1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
94654f1
07495a2
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-5
07495a2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
07495a2
4f6131f
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-4
4f6131f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
4f6131f
9cccf85
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-3
9cccf85
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
9cccf85
0657abf
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
0657abf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
0657abf
Jared K. Smith 2cff116
* Thu Oct 22 2015 Jared Smith <jsmith@fedoraproject.org> - 1.0.1-1
Jared K. Smith 2cff116
- Initial packaging