## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog ## NOTE: This spec requires copr://antedebaas/epicgreen to be enabled for builds ## to provide nodejs-22 and nodejs22-npm BuildRequires %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1 base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global pkgname pnpm Name: nodejs-%{pkgname} Version: 11.5.2 Release: %{autorelease} Summary: Fast, disk space efficient package manager # MIT is the pnpm license the others are from modules License: MIT AND Apache-2.0 AND BSD-2-Clause AND ISC URL: https://pnpm.io Source0: https://registry.npmjs.org/%{pkgname}/-/%{pkgname}-%{version}.tgz Source3: %{pkgname}-%{version}-bundled-licenses.txt BuildArch: noarch BuildRequires: fdupes BuildRequires: pkgconfig(nodejs-22) %if 0%{?fedora} && 0%{?fedora} < 41 BuildRequires: nodejs22-npm %global npm npm-22 %global __nodejs %{_bindir}/node-22 %else BuildRequires: npm %global npm npm %endif %if 0%{?rhel} < 10 BuildRequires: typescript %endif Requires: bash Requires: nodejs(engine) >= 22 Requires: %{pkgname} = %{version}-%{release} Provides: npm(%{pkgname}) = %{version} %global _description %{expand: A fast, disk space efficient package manager for NodeJS. } %description %{_description} %package -n %{pkgname} Summary: Fast, disk space efficient package manager Provides: nodejs-%{pkgname} = %{version}-%{release} %description -n %{pkgname} %{_description} %prep %autosetup -p1 -n package cp %{SOURCE3} . %build # nothing to do %install CFLAGS="%{optflags}" export CFLAGS CXXFLAGS="%{optflags}" export CXXFLAGS npm_config_prefix=%{buildroot}%{_prefix} export npm_config_prefix install -d %{buildroot}%{nodejs_sitearch} %{npm} install -g %{SOURCE0} # HACK: Move pnpm to the right location. # I haven't found a npm config for `/lib/node_modules` yet. ls -l "%{buildroot}%{nodejs_sitearch}/%{pkgname}" || true if [ ! -d "%{buildroot}%{nodejs_sitearch}/%{pkgname}" ]; then mv %{buildroot}$(dirname %{nodejs_sitearch})/node_modules/%{pkgname} %{buildroot}%{nodejs_sitearch} else ls -l %{buildroot}$(dirname %{nodejs_sitearch})/node_modules/%{pkgname} %{buildroot}%{nodejs_sitearch} fi # Fix symlinks ln -sf ..//lib/$(basename %{nodejs_sitearch})/%{pkgname}/bin/pnpm.cjs %{buildroot}%{_bindir}/pnpm ln -sf ../lib/$(basename %{nodejs_sitearch})/%{pkgname}/bin/pnpx.cjs %{buildroot}%{_bindir}/pnpx # Fix shebang in pnp(m|x) sed -i -e 's|#!%{_bindir}/env node|#!%{_bindir}/node|' %{buildroot}%{nodejs_sitelib}/%{pkgname}/bin/* # fix shebang to point at node-22 on Fedora < 41 %if 0%{?fedora} && 0%{?fedora} < 41 sed -i -e '1s/$/-22/' %{buildroot}%{nodejs_sitearch}/%{pkgname}/bin/* %endif ### CLEANUP # Remove hidden files find %{buildroot}%{nodejs_sitelib}/pnpm/dist/node_modules -type f -name '.*' -delete # Remove hidden directories rm -rf %{buildroot}%{nodejs_sitelib}/%{pkgname}/dist/node_modules/.pnpm rm -rf %{buildroot}%{nodejs_sitelib}/%{pkgname}/dist/node_modules/balanced-match/.github rm -rf %{buildroot}%{nodejs_sitelib}/%{pkgname}/dist/node_modules/cacache/node_modules/brace-expansion/.github rm -rf %{buildroot}%{nodejs_sitelib}/%{pkgname}/dist/node_modules/iconv-lite/.github rm -rf %{buildroot}%{nodejs_sitelib}/%{pkgname}/dist/node_modules/iconv-lite/.idea # Removed unused modules rm -rf %{buildroot}%{nodejs_sitelib}/%{pkgname}/dist/node_modules/node-gyp rm -rf %{buildroot}%{nodejs_sitelib}/%{pkgname}/dist/node_modules/node-gyp-bin # Remove duplicates %fdupes %{buildroot}%{nodejs_sitelib}/%{pkgname} %check # Skip runtime check - ESM module with top-level await cannot be tested # Simply verify key files exist test -d %{buildroot}%{nodejs_sitearch}/%{pkgname} test -L %{buildroot}%{_bindir}/pn test -L %{buildroot}%{_bindir}/pnpm test -L %{buildroot}%{_bindir}/pnx test -L %{buildroot}%{_bindir}/pnpx %files # Meta-package - no files, just requires pnpm %files -n %{pkgname} %license LICENSE %{pkgname}-%{version}-bundled-licenses.txt %doc README.md %{_bindir}/pn %{_bindir}/pnpm %{_bindir}/pnx %{_bindir}/pnpx %{nodejs_sitearch}/pnpm %changelog * Wed May 27 2026 Brian J. Murrell - 10.34.1-1 - Update to 10.34.1 * Wed May 27 2026 Brian J. Murrell - 10.34.0-1 - Update to 10.34.0 * Wed May 06 2026 Brian J. Murrell - 10.33.4-1 - Update to 10.33.4 * Tue May 05 2026 Brian J. Murrell - 10.33.3-1 - Update to 10.33.3 * Thu Apr 23 2026 Brian J. Murrell - 10.33.2-1 - Update to 10.33.2 * Wed Apr 22 2026 Brian J. Murrell - 10.33.1-1 - Update to 10.33.1 * Tue Mar 24 2026 Brian J. Murrell - 10.33.0-1 - Update to 10.33.0 * Tue Mar 10 2026 Brian J. Murrell - 10.32.1-1 - Update to 10.32.1 * Mon Mar 09 2026 Brian J. Murrell - 10.32.0-1 - Update to 10.32.0 * Sat Mar 07 2026 Brian J. Murrell - 10.31.0-1 - Update to 10.31.0 * Thu Feb 26 2026 Brian J. Murrell - 10.30.3-1 - Update to 10.30.3 * Thu Feb 26 2026 Brian J. Murrell - 10.30.3-1 - Update to 10.30.3 * Sun Feb 15 2026 Brian J. Murrell - 10.29.2-1 - Update to 10.29.2 * Tue Mar 11 2025 Brian J. Murrell - 9.15.9-2 - BR: nodejs22-npm for Fedora < 40 - Adjust paths and shebangs accordingly * Mon Mar 10 2025 Brian J. Murrell - 9.15.9-1 - Update to 9.15.9 * Sun Mar 09 2025 Brian J. Murrell - 9.15.8-1 - Update to 9.15.8 * Sun Mar 09 2025 Brian J. Murrell - 9.15.8-1 - Update to 9.15.8 * Sun Mar 09 2025 Brian J. Murrell - 9.15.8-1 - Update to 9.15.8