%{?nodejs_find_provides_and_requires} %global packagename spdx-correct %global enable_tests 1 Name: nodejs-spdx-correct Version: 1.0.2 Release: 1 Summary: Correct invalid SPDX identifiers License: ASL 2.0 URL: https://github.com/jslicense/spdx-correct.js Source0: https://registry.npmjs.org/spdx-correct/-/spdx-correct-%{version}.tgz Source1: https://raw.githubusercontent.com/jslicense/spdx-correct.js/v%{version}/examples.test.js ExclusiveArch: %{nodejs_arches} noarch BuildArch: noarch BuildRequires: nodejs-packaging %if 0%{?enable_tests} BuildRequires: npm(tape) npm(spdx-expression-parse) %endif %description correct invalid SPDX identifiers %prep %setup -q -n package cp -p %{SOURCE1} . %build %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} cp -pr package.json *.js \ %{buildroot}%{nodejs_sitelib}/%{packagename} %nodejs_symlink_deps %check %nodejs_symlink_deps --check %{__nodejs} -e 'require("./")' %if 0%{?enable_tests} %__nodejs examples.test.js %endif %files %{!?_licensedir:%global license %doc} %doc *.md %license LICENSE %{nodejs_sitelib}/%{packagename} %changelog * Wed Aug 12 2020 zhanghua - 1.0.2-1 - package init