47 lines
1.1 KiB
RPMSpec
47 lines
1.1 KiB
RPMSpec
|
|
%global npm_name json-parse-helpfulerror
|
||
|
|
%{?nodejs_find_provides_and_requires}
|
||
|
|
%global enable_tests 0
|
||
|
|
Name: nodejs-json-parse-helpfulerror
|
||
|
|
Version: 1.0.3
|
||
|
|
Release: 1
|
||
|
|
Summary: A drop-in replacement for JSON.parse that uses `jju` to give helpful errors
|
||
|
|
Url: https://github.com/smikes/json-parse-helpfulerror
|
||
|
|
Source0: https://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz
|
||
|
|
License: MIT
|
||
|
|
BuildArch: noarch
|
||
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
||
|
|
BuildRequires: nodejs-packaging
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
BuildRequires: npm(code) npm(jslint) npm(lab)
|
||
|
|
%endif
|
||
|
|
BuildRequires: npm(jju)
|
||
|
|
%description
|
||
|
|
A drop-in replacement for JSON.parse that uses `jju` to give helpful errors
|
||
|
|
|
||
|
|
%prep
|
||
|
|
%setup -q -n package
|
||
|
|
|
||
|
|
%build
|
||
|
|
|
||
|
|
%install
|
||
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
|
||
|
|
cp -pr package.json *.js \
|
||
|
|
%{buildroot}%{nodejs_sitelib}/%{npm_name}
|
||
|
|
%{nodejs_symlink_deps}
|
||
|
|
%if 0%{?enable_tests}
|
||
|
|
|
||
|
|
%check
|
||
|
|
%{nodejs_symlink_deps} --check
|
||
|
|
lab -c
|
||
|
|
%endif
|
||
|
|
|
||
|
|
%files
|
||
|
|
%{nodejs_sitelib}/json-parse-helpfulerror
|
||
|
|
%doc README.md
|
||
|
|
%{!?_licensedir:%global license %%doc}
|
||
|
|
%license LICENSE
|
||
|
|
|
||
|
|
%changelog
|
||
|
|
* Thu Aug 20 2020 yaokai <yaokai13@huawei.com> - 1.0.3-1
|
||
|
|
- Package init
|