add: nodejs-license-checker (#7611) (#8151)

* add: js-license-checker

* add: nodejs-license-checker

* Trying something since RPMBuild

* ???

* .



* cleanup: Weird whitespace



* js > nodejs

* chore: Remove _jsdir



* Bump dep?



* Lua test



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



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



* A



* Testing something



* Stat is so annoying



* Let's scheme



* Whoops I forgot this one needs this



* This is killing me



* I bet you this does not work



* ?



* Figure out what's going wrong



* HUH???



* Actually what is going on



* Genuinely like. What the hell is happening



* Update nodejs-license-checker.spec



* I...?



* Update nodejs-license-checker.spec



* Update nodejs-license-checker.spec



* Update nodejs-license-checker.spec



* cleanup: Everything



* chore: May as well bump this



* Bbbbb



---------


(cherry picked from commit 37c3deb32c)

Signed-off-by: Gilver <rockgrub@disroot.org>
Co-authored-by: Gilver <rockgrub@disroot.org>
This commit is contained in:
Raboneko
2025-12-07 03:46:58 -08:00
committed by GitHub
parent d43ebf446e
commit cca6831b20
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"));