Blame SPECS/nodejs-har-validator.spec

2bfa87
%{?scl:%scl_package nodejs-%{srcname}}
2bfa87
%{!?scl:%global pkg_name %{name}}
2bfa87
2bfa87
# needed for building on el6
2bfa87
%{?nodejs_find_provides_and_requires}
2bfa87
2bfa87
%global enable_tests 0
2bfa87
%global srcname har-validator
2bfa87
2bfa87
%global commit0 a71163c62b8786a41d503248fb60893598f3c26f
2bfa87
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
2bfa87
%global owner ahmadnassri
2bfa87
2bfa87
Name:           %{?scl_prefix}nodejs-%{srcname}
2bfa87
Version:        2.0.3
0ae9d1
Release:        5%{?dist}
2bfa87
Summary:        Extremely fast HTTP Archive (HAR) validator using JSON Schema
2bfa87
License:        ISC
2bfa87
URL:            https://github.com/%{owner}/%{srcname}
2bfa87
Source0:        https://github.com/%{owner}/%{srcname}/archive/%{commit0}.tar.gz#/%{srcname}-%{shortcommit0}.tar.gz
2bfa87
# https://github.com/ahmadnassri/har-validator/pull/15
2bfa87
Patch0:         nodejs-har-validator-should8.patch
2bfa87
2bfa87
BuildArch:      noarch
2bfa87
2bfa87
%if 0%{?rhel} == 6
2bfa87
ExclusiveArch:  %{ix86} x86_64 %{arm} noarch
2bfa87
%else
2bfa87
ExclusiveArch:  %{nodejs_arches} noarch
2bfa87
%endif
2bfa87
2bfa87
BuildRequires:  %{?scl_prefix}nodejs-devel
2bfa87
2bfa87
%if 0%{?enable_tests}
2bfa87
BuildRequires:  %{?scl_prefix}npm(mocha)
2bfa87
BuildRequires:  %{?scl_prefix}npm(require-directory)
2bfa87
BuildRequires:  %{?scl_prefix}npm(pinkie-promise)
2bfa87
BuildRequires:  %{?scl_prefix}npm(is-my-json-valid)
2bfa87
BuildRequires:  %{?scl_prefix}npm(should) >= 8.0.0
2bfa87
%endif
2bfa87
2bfa87
%description
2bfa87
%{summary}.
2bfa87
2bfa87
%prep
2bfa87
%autosetup -p 1 -n %{srcname}-%{commit0}
2bfa87
rm -rf node_modules
2bfa87
2bfa87
%nodejs_fixdep chalk
2bfa87
%nodejs_fixdep commander '2.x'
2bfa87
2bfa87
%build
2bfa87
#nothing to do
2bfa87
2bfa87
%install
2bfa87
mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname}
2bfa87
2bfa87
cp -pr package.json lib/ bin/ \
2bfa87
    %{buildroot}%{nodejs_sitelib}/%{srcname}
2bfa87
2bfa87
mkdir -p %{buildroot}%{_bindir}
2bfa87
ln -s %{nodejs_sitelib}/%{srcname}/bin/har-validator \
2bfa87
    %{buildroot}%{_bindir}/har-validator
2bfa87
2bfa87
%nodejs_symlink_deps
2bfa87
2bfa87
%if 0%{?enable_tests}
2bfa87
2bfa87
%check
2bfa87
%nodejs_symlink_deps --check
2bfa87
mocha
2bfa87
%endif
2bfa87
2bfa87
%files
2bfa87
%{!?_licensedir:%global license %doc}
2bfa87
%doc README.md
2bfa87
%license LICENSE
2bfa87
%{nodejs_sitelib}/%{srcname}
2bfa87
%{_bindir}/har-validator
2bfa87
2bfa87
%changelog
0ae9d1
* Mon May 28 2018 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.0.3-5
0ae9d1
- Resolves: RHBZ#1543198, rebuild for multiarch
0ae9d1
2bfa87
* Mon Jan 16 2017 Zuzana Svetlikova <zsvetlik@redhat.com> - 2.0.3-4
2bfa87
- Rebuild for rhscl
2bfa87
2bfa87
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.3-3
2bfa87
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2bfa87
2bfa87
* Sat Dec 19 2015 Tom Hughes <tom@compton.nu> - 2.0.3-2
2bfa87
- Patch tests to work with should 8.x
2bfa87
2bfa87
* Sun Dec 06 2015 Piotr Popieluch <piotr1212@gmail.com> - 2.0.3-1
2bfa87
- Update to 2.0.3
2bfa87
2bfa87
* Wed Nov 18 2015 Piotr Popieluch <piotr1212@gmail.com> - 2.0.2-1
2bfa87
- Initial package