Blob Blame History Raw
# This macro is needed at the start for building on EL6
%{?nodejs_find_provides_and_requires}

%global enable_tests 1
%global srcname each-async
%global commit 65f7f663e0e1a323c11bd0e036a08f585ab34a9c

Name:           nodejs-%{srcname}
Version:        1.1.1
Release:        4%{?dist}
Summary:        Async concurrent iterator (async forEach)
License:        MIT
URL:            https://github.com/sindresorhus/each-async
Source0:        https://github.com/sindresorhus/%{srcname}/archive/%{commit}/%{srcname}-%{commit}.tar.gz

BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires:  npm(mocha)
BuildRequires:  npm(onetime)
BuildRequires:  npm(set-immediate-shim)
%endif


%description
%{summary}.


%prep
%setup -q -n %{srcname}-%{commit}
rm -rf node_modules/


%build
#nothing to do


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

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
mocha --timeout 20000t
%endif


%files
%doc readme.md
%license license
%{nodejs_sitelib}/%{srcname}


%changelog
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Sun Mar  8 2015 Piotr Popieluch <piotr1212@gmail.com> - 1.1.1-2
- update Source0 to comply with github source guidelines

* Wed Dec 31 2014 Piotr Popieluch <piotr1212@gmail.com> - 1.1.1-1
- Initial package