%global enable_tests 1
%global module_name callsites
Name: nodejs-%{module_name}
Version: 1.0.0
Release: 3%{?dist}
Summary: Get callsites from the V8 stack trace API
License: MIT
URL: https://github.com/sindresorhus/callsites
Source0: http://registry.npmjs.org/%{module_name}/-/%{module_name}-%{version}.tgz
Source1: https://raw.githubusercontent.com/sindresorhus/callsites/master/license
Source2: https://raw.githubusercontent.com/sindresorhus/callsites/master/test.js
BuildArch: noarch
ExclusiveArch: %{nodejs_arches} noarch
BuildRequires: nodejs-packaging
%if 0%{?enable_tests}
BuildRequires: npm(mocha)
%endif
%description
%{summary}.
%prep
%setup -q -n package
rm -rf node_modules
cp -p %{SOURCE1} %{SOURCE2} .
%build
# nothing to build
%install
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
cp -pr package.json *.js %{buildroot}%{nodejs_sitelib}/%{module_name}
%nodejs_symlink_deps
%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
mocha
%endif
%files
%doc readme.md license
%{nodejs_sitelib}/%{module_name}
%changelog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Dec 08 2014 Parag Nemade <pnemade AT redhat DOT com> - 1.0.0-1
- Initial packaging