Blob Blame History Raw
%global enable_tests 1
%global srcname after

Name:           nodejs-%{srcname}
Version:        0.8.1
Release:        1%{?dist}
Summary:        Nodejs module which provides after flow control
License:        MIT
URL:            https://github.com/Raynos/after
Source0:        https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz

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

%build
#nothing to do

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

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
mocha --ui tdd --reporter spec test/*.js
%endif


%files
%doc README.md
%license LICENCE
%{nodejs_sitelib}/%{srcname}


%changelog
* Sat Aug 29 2015 Piotr Popieluch <piotr1212@gmail.com> - 0.8.1-1
- Initial package