Jared K. Smith 0f3e323
%{?nodejs_find_provides_and_requires}
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
%global packagename benchmark
c804b7f
c804b7f
# Tests disabled due to errors in QUnit
c804b7f
%global enable_tests 0
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
Name:		nodejs-benchmark
Jared K. Smith 0f3e323
Version:	2.0.0
24dd78f
Release:	7%{?dist}
Jared K. Smith 0f3e323
Summary:	A JavaScript benchmarking library
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
License:	MIT
Jared K. Smith 0f3e323
URL:		https://github.com/bestiejs/benchmark.js.git
Jared K. Smith 0f3e323
Source0:	https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
Jared K. Smith 0f3e323
# The test files are not included in the npm tarball.
Jared K. Smith 0f3e323
# Source{1,2,3} are generated by running Source10, which pulls from the upstream
Jared K. Smith 0f3e323
# version control repository.
Jared K. Smith 0f3e323
Source1:    tests-%{version}.tar.bz2
Jared K. Smith 0f3e323
Source2:    docs-%{version}.tar.bz2
Jared K. Smith 0f3e323
Source3:    examples-%{version}.tar.bz2
Jared K. Smith 0f3e323
Source10:   dl-tests.sh
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
ExclusiveArch:	%{nodejs_arches} noarch
Jared K. Smith 0f3e323
BuildArch:	noarch
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
BuildRequires:	nodejs-packaging
Jared K. Smith 0f3e323
%if 0%{?enable_tests}
Jared K. Smith 0f3e323
BuildRequires:	npm(lodash)
Jared K. Smith 0f3e323
BuildRequires:	npm(qunitjs)
Jared K. Smith 0f3e323
BuildRequires:	npm(qunit-extras)
Jared K. Smith 0f3e323
%endif
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
%description
Jared K. Smith 0f3e323
A benchmarking library that works on nearly all JavaScript platforms, supports
Jared K. Smith 0f3e323
high-resolution timers, and returns statistically significant results.
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
%prep
Jared K. Smith 0f3e323
%setup -q -n package
Jared K. Smith 0f3e323
%setup -q -T -D -a 1 -n package
Jared K. Smith 0f3e323
%setup -q -T -D -a 2 -n package
Jared K. Smith 0f3e323
%setup -q -T -D -a 3 -n package
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
%build
Jared K. Smith 0f3e323
# nothing to do!
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
%install
Jared K. Smith 0f3e323
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith 0f3e323
cp -pr package.json benchmark.js \
Jared K. Smith 0f3e323
	%{buildroot}%{nodejs_sitelib}/%{packagename}
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
%nodejs_symlink_deps
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
%check
Jared K. Smith 0f3e323
%nodejs_symlink_deps --check
Jared K. Smith 0f3e323
%{__nodejs} -e 'require("./")'
Jared K. Smith 0f3e323
%if 0%{?enable_tests}
Jared K. Smith 0f3e323
%{__nodejs} test/test.js
Jared K. Smith 0f3e323
%else
Jared K. Smith 0f3e323
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
Jared K. Smith 0f3e323
%endif
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
%files
Jared K. Smith 0f3e323
%{!?_licensedir:%global license %doc}
Jared K. Smith 0f3e323
%doc *.md doc/ example/
Jared K. Smith 0f3e323
%license LICENSE
Jared K. Smith 0f3e323
%{nodejs_sitelib}/%{packagename}
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
%changelog
24dd78f
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-7
24dd78f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
24dd78f
c804b7f
* Wed Jul 18 2018 Jared K. Smith <jsmith@fedoraproject.org> - 2.0.0-6
c804b7f
- Disable tests due to problems with QUnit
c804b7f
2cb1a32
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-5
2cb1a32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
2cb1a32
6e0b9bb
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-4
6e0b9bb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
6e0b9bb
f754781
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-3
f754781
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
f754781
64b4f24
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-2
64b4f24
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
64b4f24
Jared K. Smith 0f3e323
* Tue Jan 12 2016 Jared Smith <jsmith@fedoraproject.org> - 2.0.0-1
Jared K. Smith 0f3e323
- Update to upstream 2.0.0 release
Jared K. Smith 0f3e323
- Fix up tests
Jared K. Smith 0f3e323
Jared K. Smith 0f3e323
* Thu Oct 15 2015 Jared Smith <jsmith@fedoraproject.org> - 1.0.0-1
Jared K. Smith 0f3e323
- Initial packaging