add: nodejs-license-checker (#7611)

* add: js-license-checker

* add: nodejs-license-checker

* Trying something since RPMBuild

* ???

* .

Signed-off-by: Gilver <rockgrub@disroot.org>

* cleanup: Weird whitespace

Signed-off-by: Gilver <rockgrub@disroot.org>

* js > nodejs

* chore: Remove _jsdir

Signed-off-by: Gilver <rockgrub@disroot.org>

* Bump dep?

Signed-off-by: Gilver <rockgrub@disroot.org>

* Lua test

Signed-off-by: Gilver <rockgrub@disroot.org>

* Really shouldn't be editing code on the buggy mobile editor

Signed-off-by: Gilver <rockgrub@disroot.org>

* THIS IS EXACTLY WHY YOU DON'T EDIT ON MOBILE I DIDN'T TOUCH THIS LINE

Signed-off-by: Gilver <rockgrub@disroot.org>

* A

Signed-off-by: Gilver <rockgrub@disroot.org>

* Testing something

Signed-off-by: Gilver <rockgrub@disroot.org>

* Stat is so annoying

Signed-off-by: Gilver <rockgrub@disroot.org>

* Let's scheme

Signed-off-by: Gilver <rockgrub@disroot.org>

* Whoops I forgot this one needs this

Signed-off-by: Gilver <rockgrub@disroot.org>

* This is killing me

Signed-off-by: Gilver <rockgrub@disroot.org>

* I bet you this does not work

Signed-off-by: Gilver <rockgrub@disroot.org>

* ?

Signed-off-by: Gilver <rockgrub@disroot.org>

* Figure out what's going wrong

Signed-off-by: Gilver <rockgrub@disroot.org>

* HUH???

Signed-off-by: Gilver <rockgrub@disroot.org>

* Actually what is going on

Signed-off-by: Gilver <rockgrub@disroot.org>

* Genuinely like. What the hell is happening

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update nodejs-license-checker.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* I...?

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update nodejs-license-checker.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update nodejs-license-checker.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* Update nodejs-license-checker.spec

Signed-off-by: Gilver <rockgrub@disroot.org>

* cleanup: Everything

Signed-off-by: Gilver <rockgrub@disroot.org>

* chore: May as well bump this

Signed-off-by: Gilver <rockgrub@disroot.org>

* Bbbbb

Signed-off-by: Gilver <rockgrub@disroot.org>

---------

Signed-off-by: Gilver <rockgrub@disroot.org>
This commit is contained in:
Gilver
2025-12-07 05:46:03 -06:00
committed by GitHub
parent c167c0bbaa
commit 37c3deb32c
3 changed files with 60 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
project pkg {
arches = ["x86_64"]
rpm {
spec = "nodejs-license-checker.spec"
}
}
@@ -0,0 +1,53 @@
# The original is dead and has vulnerabilities due to it, this fork is maintainted
%global npm_name license-checker-rseidelsohn
# Disabled for now. Requires ESLint.
%bcond test 0
Name: nodejs-license-checker
Version: 4.4.2
Release: 1%{?dist}
Summary: Check NPM package licenses
SourceLicense: BSD-3-Clause
License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND CC0-1.0 AND CC-BY-3.0 AND ISC AND (MIT AND CC-BY-3.0) AND MIT
URL: https://github.com/RSeidelsohn/license-checker-rseidelsohn
BuildRequires: anda-srpm-macros >= 0.2.25
BuildRequires: nodejs-devel
BuildRequires: nodejs-npm
BuildRequires: nodejs-packaging
ExclusiveArch: %{nodejs_arches} noarch
BuildArch: noarch
Packager: Gilver E. <rockgrub@disroot.org>
%description
Extract NPM package licenses.
Enhanced and updated fork of Dav Glass' original (but abandoned) license-checker.
%prep
%npm_prep
%if %{with test}
%fetch_node_tests /tests .eslintrc.json .eslintignore
%endif
%build
%install
%npm_install -s license-checker
# Bootstrap the license fetching
# Environment variable is one set during execution of %%npm_install
./bin/%{npm_name}$_js --limitAttributes licenses --out LICENSE.modules
%if %{with test}
%check
%npm_audit
%npm_test
%endif
%files
%license LICENSE
%license LICENSE.modules
%doc CHANGELOG.md
%doc README.md
%doc SECURITY.md
%{_bindir}/license-checker
%{nodejs_sitelib}/%{npm_name}
+1
View File
@@ -0,0 +1 @@
rpm.version(npm("license-checker-rseidelsohn"));