Update to 2.0.1
This commit is contained in:
parent
015ddd4387
commit
dfb31e6677
File diff suppressed because one or more lines are too long
@ -2,13 +2,11 @@
|
|||||||
%{?nodejs_find_provides_and_requires}
|
%{?nodejs_find_provides_and_requires}
|
||||||
%global enable_tests 0
|
%global enable_tests 0
|
||||||
Name: nodejs-spdx-license-ids
|
Name: nodejs-spdx-license-ids
|
||||||
Version: 1.2.0
|
Version: 2.0.1
|
||||||
Release: 1
|
Release: 1
|
||||||
Summary: A list of SPDX license identifiers
|
Summary: A list of SPDX license identifiers
|
||||||
Url: https://github.com/shinnn/spdx-license-ids
|
Url: https://github.com/shinnn/spdx-license-ids
|
||||||
Source0: https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-%{version}.tgz
|
Source0: https://github.com/jslicense/spdx-license-ids/archive/v2.0.1.tar.gz
|
||||||
Source1: https://spdx.org/licenses/licenses.json
|
|
||||||
Source2: https://raw.githubusercontent.com/shinnn/spdx-license-ids/v1.2.0/test.js
|
|
||||||
License: Unlicense
|
License: Unlicense
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
ExclusiveArch: %{nodejs_arches} noarch
|
ExclusiveArch: %{nodejs_arches} noarch
|
||||||
@ -20,18 +18,16 @@ BuildRequires: npm(rimraf) npm(tape)
|
|||||||
A list of SPDX license identifiers
|
A list of SPDX license identifiers
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n package
|
%setup -q -n spdx-license-ids-%{version}
|
||||||
cp -p %{SOURCE1} .
|
|
||||||
cp -p %{SOURCE2} .
|
|
||||||
chmod -x README.md
|
chmod -x README.md
|
||||||
rm spdx-license-ids.json
|
chmod -x build.js bower.json
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{_bindir}/jq '[.licenses[].licenseId] | map(select(endswith("+")|not))' licenses.json > spdx-license-ids.json
|
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
|
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
|
||||||
cp -pr package.json spdx-license-ids.json %{buildroot}%{nodejs_sitelib}/%{npm_name}
|
cp -pr package.json bower.json build.js index.json module.js \
|
||||||
|
%{buildroot}%{nodejs_sitelib}/%{npm_name}
|
||||||
%{nodejs_symlink_deps}
|
%{nodejs_symlink_deps}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
@ -45,8 +41,10 @@ cp -pr package.json spdx-license-ids.json %{buildroot}%{nodejs_sitelib}/%{npm_na
|
|||||||
%{!?_licensedir:%global license %doc}
|
%{!?_licensedir:%global license %doc}
|
||||||
%{nodejs_sitelib}/spdx-license-ids
|
%{nodejs_sitelib}/spdx-license-ids
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%license LICENSE
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Oct 30 2023 wulei <wu_lei@hoperun.com> - 2.0.1-1
|
||||||
|
- Update to 2.0.1
|
||||||
|
|
||||||
* Fri Aug 21 2020 wangchong <wangchong56@huawei.com> - 1.2.0-1
|
* Fri Aug 21 2020 wangchong <wangchong56@huawei.com> - 1.2.0-1
|
||||||
- package init
|
- package init
|
||||||
|
|||||||
Binary file not shown.
20
test.js
20
test.js
@ -1,20 +0,0 @@
|
|||||||
'use strict';
|
|
||||||
|
|
||||||
const test = require('tape');
|
|
||||||
const requireBowerFiles = require('require-bower-files');
|
|
||||||
|
|
||||||
let expected = require('./spdx-license-ids.json');
|
|
||||||
|
|
||||||
function runTest(description, main) {
|
|
||||||
test(description, t => {
|
|
||||||
t.plan(1);
|
|
||||||
t.deepEqual(main, expected, 'should return an array of SPDX license identifiers.');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
runTest('require(\'spdx-license-ids\')', require('.'));
|
|
||||||
|
|
||||||
global.window = {};
|
|
||||||
requireBowerFiles({self: true});
|
|
||||||
|
|
||||||
runTest('window.spdxLicenseIds', window.spdxLicenseIds);
|
|
||||||
BIN
v2.0.1.tar.gz
Normal file
BIN
v2.0.1.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user