%{?nodejs_find_provides_and_requires}
%global enable_tests 1
Name: nodejs-negotiator
Version: 0.6.1
Release: 1%{?dist}
Summary: An HTTP content negotiator for Node.js
License: MIT
URL: https://github.com/federomero/negotiator
Source0: http://registry.npmjs.org/negotiator/-/negotiator-%{version}.tgz
# Source1 is generated by running Source10, which pulls from the upstream
# version control repository.
Source1: tests-%{version}.tar.bz2
Source2: examples-%{version}.tar.bz2
Source10: dl-tests.sh
BuildArch: noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(istanbul)
BuildRequires: npm(mocha)
%endif
%description
%{summary}.
%prep
%setup -q -n package
%setup -q -T -D -a 1 -n package
%setup -q -T -D -a 2 -n package
%build
#nothing to do
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/negotiator
cp -pr package.json index.js lib/ \
%{buildroot}%{nodejs_sitelib}/negotiator
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
/usr/bin/mocha --reporter spec --check-leaks --bail test/
/usr/bin/istanbul-js cover /usr/bin/mocha -- --reporter dot --check-leaks test/
/usr/bin/istanbul-js cover /usr/bin/mocha --report lcovonly -- --reporter spec --check-leaks test/
%endif
%files
%doc README.md HISTORY.md examples/
%license LICENSE
%{nodejs_sitelib}/negotiator
%changelog
* Tue Feb 14 2017 Zuzana Svetlikova <zsvetlik@redhat.com> - 0.6.1-1
- Update
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sun Apr 20 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.4.3-1
- update to upstream release 0.4.3
* Sun Mar 02 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.4.2-1
- initial package