Blame SPECS/nodejs-node-status-codes.spec

ff9961
%{?scl:%scl_package nodejs-%{module_name}}
ff9961
%{!?scl:%global pkg_name %{name}}
ff9961
%{?nodejs_find_provides_and_requires}
ff9961
ff9961
# ava is not available in Fedora.
ff9961
%global enable_tests 0
ff9961
%global module_name node-status-codes
ff9961
%global commit0 6014eac021c0b9dac389d43b98360d1c13c063a6
ff9961
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
ff9961
ff9961
Name:           %{?scl_prefix}nodejs-%{module_name}
ff9961
Version:        1.0.0
ff9961
Release:        3%{?dist}
ff9961
Summary:        Node.js http.STATUS_CODES ponyfill
ff9961
ff9961
License:        MIT
ff9961
URL:            https://github.com/sindresorhus/node-status-codes
ff9961
Source0:        https://github.com/sindresorhus/%{module_name}/archive/%{commit0}.tar.gz#/%{module_name}-%{shortcommit0}.tar.gz
ff9961
ff9961
BuildArch:      noarch
ff9961
ExclusiveArch:  %{nodejs_arches} noarch
ff9961
ff9961
BuildRequires:  nodejs010-runtime
ff9961
ff9961
%if 0%{?enable_tests}
ff9961
BuildRequires:  %{?scl_prefix}npm(ava)
ff9961
%endif
ff9961
ff9961
%description
ff9961
The built-in list of HTTP status codes differ between Node.js versions, so
ff9961
this is a good way to make sure it's consistent. 
ff9961
ff9961
%prep
ff9961
%setup -q -n %{module_name}-%{commit0}
ff9961
rm -rf node_modules
ff9961
ff9961
%build
ff9961
# nothing to build
ff9961
ff9961
%install
ff9961
mkdir -p %{buildroot}%{nodejs_sitelib}/%{module_name}
ff9961
cp -p package.json index.js %{buildroot}%{nodejs_sitelib}/%{module_name}
ff9961
%nodejs_symlink_deps
ff9961
ff9961
%if 0%{?enable_tests}
ff9961
ff9961
%check
ff9961
%nodejs_symlink_deps --check
ff9961
node test.js
ff9961
%endif
ff9961
ff9961
%files
ff9961
%{!?_licensedir:%global license %doc}
ff9961
%doc readme.md
ff9961
%license license
ff9961
%{nodejs_sitelib}/%{module_name}
ff9961
ff9961
%changelog
ff9961
* Tue Jan 12 2016 Tomas Hrcka <thrcka@redhat.com> - 1.0.0-3
ff9961
- Use macro to find provides and requires
ff9961
ff9961
* Tue Jan 12 2016 Tomas Hrcka <thrcka@redhat.com> - 1.0.0-2
ff9961
- Enable scl macros, fix license macro for el6
ff9961
ff9961
* Fri Jul 31 2015 Parag Nemade <pnemade AT redhat DOT com> - 1.0.0-1
ff9961
- Initial packaging