Blame nodejs-nanoseconds.spec

Jared K. Smith e912895
%{?nodejs_find_provides_and_requires}
Jared K. Smith e912895
Jared K. Smith e912895
%global packagename nanoseconds
Jared K. Smith e912895
%global enable_tests 1
Jared K. Smith e912895
Jared K. Smith e912895
Name:		nodejs-nanoseconds
Jared K. Smith e912895
Version:	0.1.0
058c287
Release:	7%{?dist}
Jared K. Smith e912895
Summary:	Convert the process.hrtime array to a single nanoseconds value
Jared K. Smith e912895
Jared K. Smith e912895
License:	MIT
Jared K. Smith e912895
URL:		https://github.com/jonschlinkert/nanoseconds
Jared K. Smith e912895
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
Jared K. Smith e912895
# The test files are not included in the npm tarball.
Jared K. Smith e912895
Source1:	https://raw.githubusercontent.com/jonschlinkert/nanoseconds/master/test.js
Jared K. Smith e912895
# Simple patch to fix tests
Jared K. Smith e912895
Patch0:		nanoseconds_fix-tests.patch
Jared K. Smith e912895
Jared K. Smith e912895
ExclusiveArch:	%{nodejs_arches} noarch
Jared K. Smith e912895
BuildArch:	noarch
Jared K. Smith e912895
Jared K. Smith e912895
BuildRequires:	nodejs-packaging
Jared K. Smith e912895
%if 0%{?enable_tests}
Jared K. Smith e912895
BuildRequires:	mocha
Jared K. Smith e912895
%endif
Jared K. Smith e912895
Jared K. Smith e912895
%description
Jared K. Smith e912895
Convert the process.hrtime array to a single nanoseconds value.
Jared K. Smith e912895
Jared K. Smith e912895
Jared K. Smith e912895
%prep
Jared K. Smith e912895
%setup -q -n package
Jared K. Smith e912895
# setup the tests
Jared K. Smith e912895
cp -p %{SOURCE1} .
Jared K. Smith e912895
%patch0 -p1
Jared K. Smith e912895
Jared K. Smith e912895
%build
Jared K. Smith e912895
# nothing to do!
Jared K. Smith e912895
Jared K. Smith e912895
%install
Jared K. Smith e912895
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith e912895
cp -pr package.json index.js \
Jared K. Smith e912895
	%{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith e912895
Jared K. Smith e912895
%nodejs_symlink_deps
Jared K. Smith e912895
Jared K. Smith e912895
%check
Jared K. Smith e912895
%nodejs_symlink_deps --check
Jared K. Smith e912895
%{__nodejs} -e 'require("./")'
Jared K. Smith e912895
%if 0%{?enable_tests}
Jared K. Smith e912895
%{_bindir}/mocha -R spec
Jared K. Smith e912895
%else
Jared K. Smith e912895
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
Jared K. Smith e912895
%endif
Jared K. Smith e912895
Jared K. Smith e912895
%files
Jared K. Smith e912895
%doc README.md
Jared K. Smith e912895
%license LICENSE
Jared K. Smith e912895
%{nodejs_sitelib}/%{packagename}
Jared K. Smith e912895
Jared K. Smith e912895
%changelog
058c287
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-7
058c287
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
058c287
3a0b9b9
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-6
3a0b9b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
3a0b9b9
d581d19
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-5
d581d19
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
d581d19
401efa7
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-4
401efa7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
401efa7
eeb71f4
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.0-3
eeb71f4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
eeb71f4
Jared K. Smith e912895
* Thu Sep 21 2017 Jared Smith <jsmith@fedoraproject.org> - 0.1.0-2
Jared K. Smith e912895
- Fix tests
Jared K. Smith e912895
Jared K. Smith e912895
* Fri Apr 14 2017 Jared Smith <jsmith@fedoraproject.org> - 0.1.0-1
Jared K. Smith e912895
- Initial packaging