Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > b25063e231d1765181d2bbd746cb80b9 > files > 4

nodejs-callsite-1.0.0-1.mga5.src.rpm

%{?nodejs_find_provides_and_requires}

%global enable_tests 0

#use a github tarball so we get the tests
%global commit 8d3927995821596148e77f4af049ab38b03d1b99
%global shortcommit %(c=%{commit}; echo ${c:0:7})

Name:           nodejs-callsite
Version:        1.0.0
Release:        %mkrel 1
Summary:        Provides access to V8's "raw" CallSites from Node.js

BuildArch:      noarch

Group:          Development/C
#No license file included, "MIT" indicated in README and package.json
#A copy of the MIT license based on the version included with express, another
#node module by the same author, is included in Source1, and has been sent
#upstream: https://github.com/visionmedia/callsite/pull/2
License:        MIT
URL:            https://github.com/visionmedia/callsite
Source0:        https://github.com/visionmedia/callsite/archive/%{commit}/%{name}-%{version}-%{shortcommit}.tar.gz
Source1:        https://raw.github.com/tchollingsworth/callsite/8d7615a28a6507c3ef0731f072d3f1a100b3fe27/LICENSE

#One of the tests doesn't work and the other needed some prodding to work
#properly.  I'll look into this more later and file a bug/pull request once I've
#figured out exactly what's going on.
Patch1:         %{name}-fix-test.patch

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
#for tests
BuildRequires:  npm(mocha)
BuildRequires:  npm(should)
%endif

%description
%{summary}.

This is useful for custom traces, C-style assertions, getting the line number in
execution, and more.

%prep
%setup -q -n callsite-%{commit}

#fix one test and don't run a non-working one
%patch1 -p1
rm -f test/__line.js

#copy LICENSE file into %%_builddir so it works with %%doc
cp %{SOURCE1} LICENSE

%build
#nothing to do

%install
rm -rf %buildroot

mkdir -p %{buildroot}%{nodejs_sitelib}/callsite
cp -pr index.js package.json %{buildroot}%{nodejs_sitelib}/callsite

%nodejs_symlink_deps

%if 0%{?enable_tests}
%check
mocha --require should
%endif

%files
%defattr(-,root,root,-)
%{nodejs_sitelib}/callsite
%doc Readme.md LICENSE examples History.md  


%changelog
* Wed Oct 29 2014 tv <tv> 1.0.0-1.mga5
+ Revision: 794361
- disable tests for bootstrap
- imported package nodejs-callsite