nodejs-jju/nodejs-jju.spec
2020-09-08 16:38:49 +08:00

48 lines
1.0 KiB
RPMSpec

%global npm_name jju
%{?nodejs_find_provides_and_requires}
%global enable_tests 1
Name: nodejs-jju
Version: 1.2.1
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
Source1: package.json
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
cp %{SOURCE1} ./
%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
* Thu Aug 20 2020 yaokai <yaokai13@huawei.com> - 1.2.1-1
- Package init