Blame nodejs-har-validator.spec

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