# needed for building on el6 %{?nodejs_find_provides_and_requires} %global enable_tests 1 %global srcname har-validator %global commit0 a71163c62b8786a41d503248fb60893598f3c26f %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) %global owner ahmadnassri Name: nodejs-%{srcname} Version: 2.0.3 Release: 1 Summary: Extremely fast HTTP Archive (HAR) validator using JSON Schema License: ISC URL: https://github.com/%{owner}/%{srcname} Source0: https://github.com/%{owner}/%{srcname}/archive/v2.0.3.tar.gz # https://github.com/ahmadnassri/har-validator/pull/15 Patch0: nodejs-har-validator-should8.patch BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(mocha) npm(require-directory) npm(pinkie-promise) npm(is-my-json-valid) BuildRequires: npm(should) >= 8.0.0 %endif %description %{summary}. %prep %autosetup -p 1 -n node-har-validator-2.0.3 rm -rf node_modules %nodejs_fixdep chalk %nodejs_fixdep commander '2.x' %build #nothing to do %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} cp -pr package.json lib/ bin/ \ %{buildroot}%{nodejs_sitelib}/%{srcname} mkdir -p %{buildroot}%{_bindir} ln -s %{nodejs_sitelib}/%{srcname}/bin/har-validator \ %{buildroot}%{_bindir}/har-validator %nodejs_symlink_deps %if 0%{?enable_tests} %check %nodejs_symlink_deps --check mocha %endif %files %{!?_licensedir:%global license %doc} %doc README.md %license LICENSE %{nodejs_sitelib}/%{srcname} %{_bindir}/har-validator %changelog * Sat Aug 29 2020 wutao - 2.0.3-1 - package init