%{?nodejs_find_provides_and_requires} %global enable_tests 0 # Tests disabled to bootstrap new npm(connect) Name: nodejs-errorhandler Version: 1.4.2 Release: 1%{?dist} Summary: The default error handler page for Connect License: MIT Group: System Environment/Libraries URL: https://github.com/expressjs/errorhandler Source0: http://registry.npmjs.org/errorhandler/-/errorhandler-%{version}.tgz # The test files are not included in the npm tarball. # Source1 is generated by running Source10, which pulls from the upstream # version control repository. Source1: tests-%{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: mocha BuildRequires: npm(connect) BuildRequires: npm(should) BuildRequires: npm(supertest) %endif %description %{summary}. %prep %setup -q -n package %setup -q -T -D -a 1 -n package %nodejs_fixdep accepts '~1.3.0' %nodejs_fixdep escape-html '~1.0.3' %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/errorhandler cp -pr package.json index.js \ %{buildroot}%{nodejs_sitelib}/errorhandler mkdir -p %{buildroot}%{_datadir}/%{name} cp -pr public/ \ %{buildroot}%{_datadir}/%{name} ln -sf %{_datadir}/%{name}/public \ %{buildroot}%{nodejs_sitelib}/errorhandler/public %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check NODE_ENV=test /usr/bin/mocha --require should --reporter spec %endif %files %doc README.md %{nodejs_sitelib}/errorhandler %dir %{_datadir}/%{name} %dir %{_datadir}/%{name}/public %{_datadir}/%{name}/public/error.html %{_datadir}/%{name}/public/style.css %changelog * Wed Nov 04 2015 Jared Smith - 1.4.2-1 - Update to upstream 1.4.2 release * Wed Jun 17 2015 Fedora Release Engineering - 1.0.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 1.0.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Wed Mar 12 2014 Jamie Nguyen - 1.0.0-2 - own {_datadir}/{name} * Mon Mar 10 2014 Jamie Nguyen - 1.0.0-1 - initial package