Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global enable_tests 0

Name:       nodejs-stack-trace
Version:    0.0.9
Release:    1%{?dist}
Summary:    Node.js module to get v8 stack traces as an array of CallSite objects
License:    MIT
Group:      System Environment/Libraries
URL:        https://github.com/felixge/node-stack-trace
Source0:    http://registry.npmjs.org/stack-trace/-/stack-trace-%{version}.tgz
# Source1 is generated by running Source10, which pulls from the upstream
# version control repository.
Source1:    tests-v%{version}.tar.bz2
Source10:   dl-tests.sh

# https://github.com/felixge/node-stack-trace/issues/4
Patch0:     %{name}-0.0.9-Remove-failing-test.patch

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}
# Not yet packaged for Fedora.
# BuildRequires:  npm(far)
# BuildRequires:  npm(long-stack-traces)
%endif

%description
%{summary}.


%prep
%setup -q -n package
%setup -q -T -D -a 1 -n package
%patch0 -p1
find . -type f -iname '*~' -delete


%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/stack-trace
cp -pr package.json lib/ \
    %{buildroot}%{nodejs_sitelib}/stack-trace

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
# /usr/bin/npm install far@0.0.3
# /usr/bin/npm install long-stack-traces@0.1.2
./test/run.js
%endif


%files
%doc License Readme.md
%{nodejs_sitelib}/stack-trace


%changelog
* Sat Apr 19 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.0.9-1
- update to upstream release 0.0.9

* Tue Jul 30 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.0.7-1
- update to upstream release 0.0.7
- restrict to compatible arches

* Fri Jun 07 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.0.6-3
- add comment about why tests are disabled

* Sat May 25 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.0.6-2
- remove leftover backup files

* Wed Feb 13 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.0.6-1
- initial package