Blame nodejs-errorhandler.spec

88b7c03
%{?nodejs_find_provides_and_requires}
88b7c03
88b7c03
%global enable_tests 0
88b7c03
88b7c03
Name:       nodejs-errorhandler
88b7c03
Version:    1.0.0
c3f14ce
Release:    3%{?dist}
88b7c03
Summary:    The default error handler page for Connect
88b7c03
License:    MIT
88b7c03
Group:      System Environment/Libraries
88b7c03
URL:        https://github.com/expressjs/errorhandler
88b7c03
Source0:    http://registry.npmjs.org/errorhandler/-/errorhandler-%{version}.tgz
88b7c03
# The test files are not included in the npm tarball.
88b7c03
# Source1 is generated by running Source10, which pulls from the upstream
88b7c03
# version control repository.
88b7c03
Source1:    tests-%{version}.tar.bz2
88b7c03
Source10:   dl-tests.sh
88b7c03
88b7c03
BuildArch:  noarch
88b7c03
%if 0%{?fedora} >= 19
88b7c03
ExclusiveArch: %{nodejs_arches} noarch
88b7c03
%else
88b7c03
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
88b7c03
%endif
88b7c03
88b7c03
BuildRequires:  nodejs-packaging
88b7c03
88b7c03
%if 0%{?enable_tests}
88b7c03
BuildRequires:  mocha
88b7c03
BuildRequires:  npm(connect)
88b7c03
BuildRequires:  npm(should)
88b7c03
BuildRequires:  npm(supertest)
88b7c03
%endif
88b7c03
88b7c03
%description
88b7c03
%{summary}.
88b7c03
88b7c03
88b7c03
%prep
88b7c03
%setup -q -n package
88b7c03
%setup -q -T -D -a 1 -n package
88b7c03
88b7c03
88b7c03
%build
88b7c03
#nothing to do
88b7c03
88b7c03
88b7c03
%install
88b7c03
mkdir -p %{buildroot}%{nodejs_sitelib}/errorhandler
88b7c03
cp -pr package.json index.js \
88b7c03
    %{buildroot}%{nodejs_sitelib}/errorhandler
88b7c03
88b7c03
mkdir -p %{buildroot}%{_datadir}/%{name}
88b7c03
cp -pr public/ \
88b7c03
    %{buildroot}%{_datadir}/%{name}
88b7c03
ln -sf %{_datadir}/%{name}/public \
88b7c03
    %{buildroot}%{nodejs_sitelib}/errorhandler/public
88b7c03
88b7c03
%nodejs_symlink_deps
88b7c03
88b7c03
88b7c03
%if 0%{?enable_tests}
88b7c03
%check
88b7c03
%nodejs_symlink_deps --check
88b7c03
NODE_ENV=test /usr/bin/mocha --require should --reporter spec
88b7c03
%endif
88b7c03
88b7c03
88b7c03
%files
88b7c03
%doc README.md
88b7c03
%{nodejs_sitelib}/errorhandler
88b7c03
%dir %{_datadir}/%{name}
88b7c03
%dir %{_datadir}/%{name}/public
88b7c03
%{_datadir}/%{name}/public/error.html
88b7c03
%{_datadir}/%{name}/public/style.css
88b7c03
88b7c03
88b7c03
%changelog
c3f14ce
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-3
c3f14ce
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
c3f14ce
88b7c03
* Wed Mar 12 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.0.0-2
88b7c03
- own {_datadir}/{name}
88b7c03
88b7c03
* Mon Mar 10 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 1.0.0-1
88b7c03
- initial package