%{?scl:%scl_package nodejs-%{npm_name}} %{!?scl:%global pkg_name %{name}} %global npm_name buffer Name: %{?scl_prefix}nodejs-buffer Version: 5.7.1 Release: 1%{?dist} Summary: Node License: MIT Group: Development/Libraries URL: https://github.com/feross/buffer Source0: https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz Source1: https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz Source2: https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz Source3: nodejs-buffer-%{version}-registry.npmjs.org.tgz BuildRequires: %{?scl_prefix_nodejs}npm %if 0%{!?scl:1} BuildRequires: nodejs-packaging %endif BuildArch: noarch ExclusiveArch: %{nodejs_arches} noarch Provides: %{?scl_prefix}npm(%{npm_name}) = %{version} Provides: bundled(npm(base64-js)) = 1.5.1 Provides: bundled(npm(buffer)) = 5.7.1 Provides: bundled(npm(ieee754)) = 1.2.1 AutoReq: no AutoProv: no %if 0%{?scl:1} %define npm_cache_dir npm_cache %else %define npm_cache_dir /tmp/npm_cache_%{name}-%{version}-%{release} %endif %description %{summary} %prep mkdir -p %{npm_cache_dir} %{?scl:scl enable %{?scl_nodejs} - << \end_of_scl} for tgz in %{sources}; do echo $tgz | grep -q registry.npmjs.org || npm cache add --cache %{npm_cache_dir} $tgz done %{?scl:end_of_scl} %setup -T -q -a 3 -D -n %{npm_cache_dir} %build %{?scl:scl enable %{?scl_nodejs} - << \end_of_scl} npm install --legacy-peer-deps --cache-min Infinity --cache %{?scl:../}%{npm_cache_dir} --no-shrinkwrap --no-optional --global-style true %{npm_name}@%{version} %{?scl:end_of_scl} %install mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/node_modules %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/index.d.ts %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/index.js %{buildroot}%{nodejs_sitelib}/%{npm_name} cp -pfr node_modules/%{npm_name}/package.json %{buildroot}%{nodejs_sitelib}/%{npm_name} %clean rm -rf %{buildroot} %{npm_cache_dir} %files %{nodejs_sitelib}/%{npm_name} %license node_modules/%{npm_name}/LICENSE %doc node_modules/%{npm_name}/AUTHORS.md %doc node_modules/%{npm_name}/README.md %changelog * Mon Jan 29 2024 Evgeni Golov 5.7.1-1 - Add nodejs-buffer generated by npm2rpm using the bundle strategy