Blame SPECS/nodejs-is-redirect.spec

54d4ec
%{?scl:%scl_package nodejs-%{module_name}}
54d4ec
%{!?scl:%global pkg_name %{name}}
54d4ec
%{?nodejs_find_provides_and_requires}
54d4ec
54d4ec
%global enable_tests 0
54d4ec
%global module_name is-redirect
54d4ec
54d4ec
Name:           %{?scl_prefix}nodejs-%{module_name}
54d4ec
Version:        1.0.0
54d4ec
Release:        4%{?dist}
54d4ec
Summary:        Check if a number is a redirect HTTP status code
54d4ec
54d4ec
License:        MIT
54d4ec
URL:            https://github.com/sindresorhus/is-redirect
54d4ec
Source0:        https://github.com/sindresorhus/is-redirect/archive/%{version}.tar.gz
54d4ec
54d4ec
BuildArch:      noarch
54d4ec
ExclusiveArch:  %{nodejs_arches} noarch
54d4ec
54d4ec
BuildRequires:  nodejs010-runtime
54d4ec
54d4ec
%if 0%{?enable_tests}
54d4ec
BuildRequires:  %{?scl_prefix}npm(ava)
54d4ec
%endif
54d4ec
54d4ec
%description
54d4ec
Check if a number is a redirect HTTP status code.
54d4ec
54d4ec
%prep
54d4ec
%setup -q -n %{module_name}-%{version}
54d4ec
rm -rf node_modules
54d4ec
54d4ec
%build
54d4ec
# nothing to build
54d4ec
54d4ec
%install
54d4ec
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
54d4ec
cp -pr package.json index.js %{buildroot}%{nodejs_sitelib}/%{module_name}
54d4ec
54d4ec
%nodejs_symlink_deps
54d4ec
54d4ec
#disable tests as they need network access
54d4ec
%if 0%{?enable_tests}
54d4ec
54d4ec
%check
54d4ec
%nodejs_symlink_deps --check
54d4ec
node test.js
54d4ec
%endif
54d4ec
54d4ec
%files
54d4ec
%{!?_licensedir:%global license %doc}
54d4ec
%doc readme.md
54d4ec
%license license
54d4ec
%{nodejs_sitelib}/%{module_name}
54d4ec
54d4ec
%changelog
54d4ec
* Sun Feb 14 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 1.0.0-4
54d4ec
- rebuilt
54d4ec
54d4ec
* Tue Jan 12 2016 Tomas Hrcka <thrcka@redhat.com> - 1.0.0-3
54d4ec
- Use macro to find provides and requires
54d4ec
54d4ec
* Tue Jan 12 2016 Tomas Hrcka <thrcka@redhat.com> - 1.0.0-2
54d4ec
- Enable scl macros, fix license macro for el6
54d4ec
54d4ec
* Fri Jul 03 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.0.0-1
54d4ec
- Initial packaging