%{?nodejs_find_provides_and_requires} #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: 1%{?dist} Summary: Provides access to V8's "raw" CallSites from Node.js BuildArch: noarch Group: Development/Libraries #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 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) #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-devel #for tests BuildRequires: npm(mocha) BuildRequires: npm(should) %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 %check mocha --require should %clean rm -rf %buildroot %files %defattr(-,root,root,-) %{nodejs_sitelib}/callsite %doc Readme.md LICENSE examples History.md %changelog * Sun Jun 02 2013 T.C. Hollingsworth - 1.0.0-1 - initial package