2020-08-21 15:43:04 +08:00
|
|
|
%{?nodejs_find_provides_and_requires}
|
|
|
|
|
%global packagename spdx-expression-parse
|
|
|
|
|
%global enable_tests 1
|
|
|
|
|
Name: nodejs-spdx-expression-parse
|
|
|
|
|
Version: 1.0.2
|
|
|
|
|
Release: 1
|
|
|
|
|
Summary: Parse SPDX license expressions
|
|
|
|
|
License: MIT and CC-BY
|
|
|
|
|
URL: https://github.com/kemitchell/spdx-expression-parse.js.git
|
|
|
|
|
Source0: https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-%{version}.tgz
|
|
|
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
|
|
|
BuildArch: noarch
|
2020-08-21 16:01:09 +08:00
|
|
|
BuildRequires: nodejs-packaging uglify-js npm(jison) npm(spdx-license-ids)
|
|
|
|
|
BuildRequires: npm(spdx-exceptions)
|
2020-08-21 15:43:04 +08:00
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
%endif
|
2020-08-21 16:01:09 +08:00
|
|
|
Requires: nodejs
|
2020-08-21 15:43:04 +08:00
|
|
|
%description
|
|
|
|
|
Parse SPDX license expressions
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n package
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%nodejs_symlink_deps --check
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
cp -pr package.json *.js \
|
|
|
|
|
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
%nodejs_symlink_deps
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%{__nodejs} -e 'require("./")'
|
|
|
|
|
%if 0%{?enable_tests}
|
|
|
|
|
echo "There are no tests..."
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%{!?_licensedir:%global license %doc}
|
|
|
|
|
%doc *.md
|
|
|
|
|
%license LICENSE
|
|
|
|
|
%{nodejs_sitelib}/%{packagename}
|
2020-08-21 11:11:08 +08:00
|
|
|
|
|
|
|
|
%changelog
|
2020-08-21 15:43:04 +08:00
|
|
|
* Fri Aug 21 2020 wangchong <wangchong56@huawei.com> - 1.0.2-1
|
2020-08-21 11:11:08 +08:00
|
|
|
- package init
|