Blame SPECS/nodejs-timed-out.spec

7b1d44
%{?scl:%scl_package nodejs-%{module_name}}
7b1d44
%{!?scl:%global pkg_name %{name}}
7b1d44
%{?nodejs_find_provides_and_requires}
7b1d44
7b1d44
%global enable_tests 0
7b1d44
%global module_name timed-out
7b1d44
7b1d44
Name:           %{?scl_prefix}nodejs-%{module_name}
7b1d44
Version:        2.0.0
7b1d44
Release:        6%{?dist}
7b1d44
Summary:        Timeout HTTP/HTTPS requests
7b1d44
7b1d44
License:        MIT
7b1d44
URL:            https://github.com/floatdrop/timed-out
7b1d44
Source0:        http://registry.npmjs.org/%{module_name}/-/%{module_name}-%{version}.tgz
7b1d44
Source1:        https://raw.githubusercontent.com/floatdrop/timed-out/master/license
7b1d44
Source2:        https://raw.githubusercontent.com/floatdrop/timed-out/master/test.js
7b1d44
BuildArch:      noarch
7b1d44
ExclusiveArch:  %{nodejs_arches} noarch
7b1d44
7b1d44
BuildRequires:  nodejs010-runtime
7b1d44
7b1d44
%if 0%{?enable_tests}
7b1d44
BuildRequires:  %{?scl_prefix}npm(mocha)
7b1d44
%endif
7b1d44
7b1d44
%description
7b1d44
Timeout HTTP/HTTPS requests. Emit Error object with code property
7b1d44
equal ETIMEDOUT or ESOCKETTIMEDOUT when ClientRequest is hanged.
7b1d44
7b1d44
%prep
7b1d44
%setup -q -n package
7b1d44
rm -rf node_modules
7b1d44
7b1d44
cp -p %{SOURCE1} %{SOURCE2} .
7b1d44
7b1d44
%build
7b1d44
# nothing to build
7b1d44
7b1d44
%install
7b1d44
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
7b1d44
cp -pr package.json *.js %{buildroot}%{nodejs_sitelib}/%{module_name}
7b1d44
%nodejs_symlink_deps
7b1d44
7b1d44
%if 0%{?enable_tests}
7b1d44
7b1d44
%check
7b1d44
%nodejs_symlink_deps --check
7b1d44
mocha
7b1d44
%endif
7b1d44
7b1d44
%files
7b1d44
%{!?_licensedir:%global license %doc}
7b1d44
%doc readme.md license
7b1d44
%{nodejs_sitelib}/%{module_name}
7b1d44
7b1d44
%changelog
7b1d44
* Sun Feb 14 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.0.0-6
7b1d44
- rebuilt
7b1d44
7b1d44
* Tue Jan 12 2016 Tomas Hrcka <thrcka@redhat.com> - 2.0.0-5
7b1d44
- Use macro to find provides and requires
7b1d44
7b1d44
* Tue Jan 12 2016 Tomas Hrcka <thrcka@redhat.com> - 2.0.0-4
7b1d44
- Enable scl macros, fix license macro for el6
7b1d44
7b1d44
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-3
7b1d44
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
7b1d44
7b1d44
* Sun Dec 07 2014 Parag Nemade <pnemade AT redhat DOT com> - 2.0.0-2
7b1d44
- Add test.js from upstream and enable tests
7b1d44
7b1d44
* Thu Dec 04 2014 Parag Nemade <pnemade AT redhat DOT com> - 2.0.0-1
7b1d44
- Initial packaging