%{?nodejs_find_provides_and_requires}
%global packagename tracejs
%global enable_tests 1
Name: nodejs-tracejs
Version: 0.1.8
Release: 4%{?dist}
Summary: Expand Error.stack traces into usable objects providing context
License: BSD
URL: https://github.com/chrisdickinson/tracejs
Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
# License file requested at https://github.com/chrisdickinson/tracejs/issues/8
Source1: LICENSE-BSD-2.txt
ExclusiveArch: %{nodejs_arches} noarch
BuildArch: noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
#
%endif
%description
Expand Error.stack traces into usable objects providing context and highlighting
%prep
%setup -q -n package
# setup the license file
cp -p %{SOURCE1} .
%build
# nothing to do!
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
cp -pr package.json *.js \
%{buildroot}%{nodejs_sitelib}/%{packagename}
%nodejs_symlink_deps
%check
%nodejs_symlink_deps --check
%{__nodejs} -e 'require("./")'
%if 0%{?enable_tests}
%{__nodejs} test/test.js
%else
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
%endif
%files
%{!?_licensedir:%global license %doc}
%license LICENSE-BSD-2.txt
%doc *.md
%{nodejs_sitelib}/%{packagename}
%changelog
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.1.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Fri Jul 08 2016 Jared Smith <jsmith@fedoraproject.org> - 0.1.8-2
- Update tests and add missing license file
* Tue Oct 20 2015 Jared Smith <jsmith@fedoraproject.org> - 0.1.8-1
- Initial packaging