!2 Update to 2.0.1
From: @wu-leilei Reviewed-by: @wang--ge Signed-off-by: @wang--ge
This commit is contained in:
commit
4cf83b70f1
File diff suppressed because one or more lines are too long
@ -2,13 +2,11 @@
|
||||
%{?nodejs_find_provides_and_requires}
|
||||
%global enable_tests 0
|
||||
Name: nodejs-spdx-license-ids
|
||||
Version: 1.2.0
|
||||
Version: 2.0.1
|
||||
Release: 1
|
||||
Summary: A list of SPDX license identifiers
|
||||
Url: https://github.com/shinnn/spdx-license-ids
|
||||
Source0: https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-%{version}.tgz
|
||||
Source1: https://spdx.org/licenses/licenses.json
|
||||
Source2: https://raw.githubusercontent.com/shinnn/spdx-license-ids/v1.2.0/test.js
|
||||
Source0: https://github.com/jslicense/spdx-license-ids/archive/v2.0.1.tar.gz
|
||||
License: Unlicense
|
||||
BuildArch: noarch
|
||||
ExclusiveArch: %{nodejs_arches} noarch
|
||||
@ -20,18 +18,16 @@ BuildRequires: npm(rimraf) npm(tape)
|
||||
A list of SPDX license identifiers
|
||||
|
||||
%prep
|
||||
%setup -q -n package
|
||||
cp -p %{SOURCE1} .
|
||||
cp -p %{SOURCE2} .
|
||||
%setup -q -n spdx-license-ids-%{version}
|
||||
chmod -x README.md
|
||||
rm spdx-license-ids.json
|
||||
chmod -x build.js bower.json
|
||||
|
||||
%build
|
||||
%{_bindir}/jq '[.licenses[].licenseId] | map(select(endswith("+")|not))' licenses.json > spdx-license-ids.json
|
||||
|
||||
%install
|
||||
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}
|
||||
|
||||
%check
|
||||
@ -45,8 +41,10 @@ cp -pr package.json spdx-license-ids.json %{buildroot}%{nodejs_sitelib}/%{npm_na
|
||||
%{!?_licensedir:%global license %doc}
|
||||
%{nodejs_sitelib}/spdx-license-ids
|
||||
%doc README.md
|
||||
%license LICENSE
|
||||
|
||||
%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
|
||||
- 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