2020-09-08 16:38:49 +08:00
|
|
|
%global npm_name jju
|
|
|
|
|
%{?nodejs_find_provides_and_requires}
|
|
|
|
|
%global enable_tests 1
|
|
|
|
|
Name: nodejs-jju
|
2023-11-02 15:00:01 +08:00
|
|
|
Version: 1.4.0
|
2020-09-08 16:38:49 +08:00
|
|
|
Release: 1
|
|
|
|
|
Summary: A set of utilities to work with JSON / JSON5 documents
|
|
|
|
|
Url: https://github.com/rlidwka/jju
|
|
|
|
|
Source0: https://github.com/rlidwka/jju/archive/v%{version}.tar.gz
|
|
|
|
|
License: WTFPL
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
|
|
|
BuildRequires: nodejs-packaging
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
BuildRequires: npm(js-yaml) mocha
|
|
|
|
|
%endif
|
|
|
|
|
%description
|
|
|
|
|
A set of utilities to work with JSON / JSON5 documents
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n jju-%{version}
|
|
|
|
|
rm -rf test/test_parse.js
|
|
|
|
|
%nodejs_fixdep mocha
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/jju
|
|
|
|
|
cp -pr package.json *.js lib/ \
|
|
|
|
|
%{buildroot}%{nodejs_sitelib}/jju
|
|
|
|
|
%{nodejs_symlink_deps}
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%{nodejs_symlink_deps} --check
|
|
|
|
|
mocha test/*.js
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%{nodejs_sitelib}/jju
|
|
|
|
|
%doc README.md
|
|
|
|
|
|
|
|
|
|
%changelog
|
2023-11-02 15:00:01 +08:00
|
|
|
* Thu Nov 02 2023 wulei <wu_lei@hoperun.com> - 1.4.0-1
|
|
|
|
|
- Update to 1.4.0
|
|
|
|
|
|
2020-09-08 16:38:49 +08:00
|
|
|
* Thu Aug 20 2020 yaokai <yaokai13@huawei.com> - 1.2.1-1
|
|
|
|
|
- Package init
|