Blob Blame History Raw
%global module_name chainsaw

Name:           nodejs-%{module_name}
Version:        0.1.0
Release:        1%{?dist}
Summary:        Build chainable fluent interfaces the easy way

License:        MIT
URL:            https://github.com/substack/node-chainsaw
Source0:        http://registry.npmjs.org/%{module_name}/-/%{module_name}-%{version}.tgz
Source1:        https://raw.githubusercontent.com/substack/node-chainsaw/master/LICENSE
BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch

BuildRequires:  nodejs-packaging

BuildRequires: npm(traverse)

%description
%{summary}.

%prep
%setup -q -n package
rm -rf node_modules
cp -p %{SOURCE1} .
chmod 644 index.js
%nodejs_fixdep traverse ~0.4

%build

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


%check
%nodejs_symlink_deps --check
node test/*.js

%files
%doc LICENSE README.markdown examples
%{nodejs_sitelib}/%{module_name}


%changelog
* Mon Sep 15 2014 Parag Nemade <pnemade AT redhat DOT com> - 0.1.0-1
- Initial packaging