[packages/nodejs-gyp] up to 11.2.0
atler
atler at pld-linux.org
Thu Jul 10 14:52:10 CEST 2025
commit c88614272c40fabcdf174d1439289c1995a9fa4d
Author: Jan Palus <atler at pld-linux.org>
Date: Thu Jul 10 14:50:49 2025 +0200
up to 11.2.0
link-libnode.patch | 6 +++---
nodejs-gyp.spec | 49 ++++++++++++++++++-------------------------------
2 files changed, 21 insertions(+), 34 deletions(-)
---
diff --git a/nodejs-gyp.spec b/nodejs-gyp.spec
index e918064..70171cd 100644
--- a/nodejs-gyp.spec
+++ b/nodejs-gyp.spec
@@ -5,45 +5,28 @@
%define pkg node-gyp
Summary: Node.js native addon build tool
Name: nodejs-gyp
-Version: 1.0.1
-Release: 2
+Version: 11.2.0
+Release: 1
License: MIT
Group: Development/Libraries
Source0: http://registry.npmjs.org/node-gyp/-/node-gyp-%{version}.tgz
-# Source0-md5: ecb5099d36c8ef2018a898ece3e41e99
+# Source0-md5: b458b941ff4e015a1464437532aaffb0
+# tar xf node-gyp-%{version}.tgz
+# npm -C package install --omit dev --no-audit --no-fund
+# tar acf nodejs-gyp-node_modules-%{version}.tar.xz package/node_modules
+Source1: %{name}-node_modules-%{version}.tar.xz
+# Source1-md5: 02f806bb4e6b7fc6371c9ca2868ecb9e
Patch0: system-gyp.patch
Patch1: link-libnode.patch
URL: https://github.com/TooTallNate/node-gyp
BuildRequires: sed >= 4.0
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
%{?with_system_gyp:Requires: gyp}
Requires: make
-Requires: nodejs >= 0.8.0
+Requires: nodejs >= 20.5.0
Requires: nodejs-devel
-Requires: nodejs-fstream < 2
-Requires: nodejs-fstream >= 1.0.0
-Requires: nodejs-glob < 5
-Requires: nodejs-glob >= 3
-Requires: nodejs-graceful-fs < 4
-Requires: nodejs-graceful-fs >= 3
-Requires: nodejs-minimatch < 2
-Requires: nodejs-minimatch >= 1
-Requires: nodejs-mkdirp < 1
-Requires: nodejs-mkdirp >= 0.5.0
-Requires: nodejs-nopt < 4
-Requires: nodejs-nopt >= 2
-Requires: nodejs-npmlog < 1
-Requires: nodejs-osenv < 1
-Requires: nodejs-request < 3
-Requires: nodejs-request >= 2
-Requires: nodejs-rimraf < 3
-Requires: nodejs-rimraf >= 2
-Requires: nodejs-semver < 4
-Requires: nodejs-semver >= 2
-Requires: nodejs-tar < 2
-Requires: nodejs-tar >= 1.0.0
-Requires: nodejs-which < 2
-Requires: nodejs-which >= 1
-Requires: python >= 2.7
+Requires: python3
Obsoletes: node-node-gyp
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -55,7 +38,7 @@ of dealing with the various differences in build platforms. It is the
replacement to the node-waf program which is removed for node v0.8.
%prep
-%setup -qc
+%setup -qc -a1
mv package/* .
%{?with_system_gyp:%patch -P0 -p1}
%patch -P1 -p1
@@ -64,13 +47,16 @@ mv package/* .
%{__sed} -i -e '1s,^#!.*node,#!/usr/bin/node,' \
bin/node-gyp.js
+grep -r '#!.*env python3' -l gyp | xargs %{__sed} -i -e '1 s,#!.*env python3,#!%{__python3},'
+grep -r '#!.*env node' -l node_modules | xargs %{__sed} -i -e '1 s,#!.*env node,#!/usr/bin/node,'
+
# cleanup backups after patching
find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT{%{_bindir},%{nodejs_libdir}/%{pkg}}
-cp -pr bin lib package.json $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
+cp -pr bin lib node_modules package.json $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
cp -pr *.gyp* $RPM_BUILD_ROOT%{nodejs_libdir}/%{pkg}
ln -s %{nodejs_libdir}/%{pkg}/bin/node-gyp.js $RPM_BUILD_ROOT%{_bindir}/node-gyp
%if %{with system_gyp}
@@ -92,5 +78,6 @@ rm -rf $RPM_BUILD_ROOT
%{nodejs_libdir}/%{pkg}/addon.gypi
%{nodejs_libdir}/%{pkg}/gyp
%{nodejs_libdir}/%{pkg}/lib
+%{nodejs_libdir}/%{pkg}/node_modules
%dir %{nodejs_libdir}/%{pkg}/bin
%attr(755,root,root) %{nodejs_libdir}/%{pkg}/bin/node-gyp.js
diff --git a/link-libnode.patch b/link-libnode.patch
index c1d54d3..7a0e7ec 100644
--- a/link-libnode.patch
+++ b/link-libnode.patch
@@ -1,12 +1,12 @@
--- nodejs-gyp-0.9.5/addon.gypi~ 2013-03-09 01:42:19.000000000 +0200
+++ nodejs-gyp-0.9.5/addon.gypi 2013-04-08 20:07:37.237603565 +0300
@@ -39,6 +39,9 @@
- }],
- [ 'OS=="freebsd" or OS=="openbsd" or OS=="solaris" or (OS=="linux" and target_arch!="ia32")', {
+ [ 'OS in "freebsd openbsd netbsd solaris android" or \
+ (OS=="linux" and target_arch!="ia32")', {
'cflags': [ '-fPIC' ],
+ }],
+ [ '1==1', {
+ 'libraries': [ '-lnode' ],
- }]
+ }],
]
}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nodejs-gyp.git/commitdiff/c88614272c40fabcdf174d1439289c1995a9fa4d
More information about the pld-cvs-commit
mailing list