67 lines
1.7 KiB
RPMSpec
67 lines
1.7 KiB
RPMSpec
%{?nodejs_find_provides_and_requires}
|
|
|
|
%global packagename validate-npm-package-license
|
|
%global enable_tests 1
|
|
|
|
Name: nodejs-validate-npm-package-license
|
|
Version: 3.0.1
|
|
Release: 2
|
|
Summary: Validates an npm package license string
|
|
|
|
License: ASL 2.0
|
|
URL: https://github.com/kemitchell/validate-npm-package-license.js.git
|
|
Source0: https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-%{version}.tgz
|
|
|
|
ExclusiveArch: %{nodejs_arches} noarch
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: nodejs-packaging
|
|
%if 0%{?enable_tests}
|
|
BuildRequires: npm(defence-cli) npm(replace-require-self) npm(spdx-correct)
|
|
BuildRequires: npm(spdx-expression-parse)
|
|
%endif
|
|
|
|
Requires: nodejs
|
|
|
|
%description
|
|
Give me a string and I'll tell you if it's a valid npm package license string.
|
|
|
|
|
|
%prep
|
|
%setup -q -n package
|
|
%nodejs_fixdep spdx-correct '^2.0.4'
|
|
%nodejs_fixdep spdx-expression-parse '^2.0.2'
|
|
|
|
%build
|
|
# nothing to do!
|
|
|
|
%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}
|
|
defence README.md | replace-require-self | node
|
|
%endif
|
|
|
|
|
|
%files
|
|
%{!?_licensedir:%global license %doc}
|
|
%doc *.md
|
|
%license LICENSE
|
|
%{nodejs_sitelib}/%{packagename}
|
|
|
|
|
|
|
|
%changelog
|
|
* Mon Oct 30 2023 wulei <wu_lei@hoperun.com> - 3.0.1-2
|
|
- Modify spdx-correct and spdx-expression-parse version to fix install problem
|
|
|
|
* Wed Aug 12 2020 wangxiao <wangxiao65@huawei.com> - 3.0.1-1
|
|
- package init
|