Name: node-gyp Version: 10.2.0 Release: 0.1%{?dist} Summary: Node.js native addon build tool License: MIT URL: https://github.com/nodejs/node-gyp Source0: https://registry.npmjs.org/%{name}/-/%{name}-%{version}.tgz Source1: %{name}-%{version}-nm-prod.tgz Source2: %{name}-%{version}-nm-dev.tgz Source3: %{name}-%{version}-bundled-licenses.txt Source4: addon-rpm.gypi # Use system gyp and nodejs-devel Patch1: %{name}-system-node-gyp.patch BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch Requires: gcc-c++ Requires: gyp Requires: nodejs-devel BuildRequires: nodejs-devel %description %{summary}. %prep %autosetup -p1 -n package sed -i 's~/usr/share/node~/usr/share/node-%{_nodejs_major_version}~' lib/configure.js cp -p %{SOURCE3} . cp -p %{SOURCE4} addon-rpm.gypi # Setup bundled runtime(prod) node modules tar xfz %{SOURCE1} mkdir -p node_modules pushd node_modules ln -s ../node_modules_prod/* . ln -s ../node_modules_prod/.bin . popd %build %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{name} cp -rp package.json addon.gypi addon-rpm.gypi bin/ gyp/ lib/ \ %{buildroot}%{nodejs_sitelib}/%{name} cp -rp node_modules node_modules_prod \ %{buildroot}%{nodejs_sitelib}/%{name} mkdir -p %{buildroot}%{_bindir} chmod 0755 %{buildroot}%{nodejs_sitelib}/%{name}/bin/node-gyp.js ln -sf %{nodejs_sitelib}/%{name}/bin/node-gyp.js %{buildroot}%{_bindir}/%{name} %check %{__nodejs} -e 'require("./")' %files %doc README.md CHANGELOG.md %license LICENSE %{name}-%{version}-bundled-licenses.txt %{nodejs_sitelib}/%{name} %{_bindir}/%{name} %changelog * Thu Nov 21 2024 Michael Cronenworth - 10.2.0-0.1 - Initial spec