## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %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: 10.2.1 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: http://registry.npmjs.org/%{pkgname}/-/%{pkgname}-%{version}.tgz Source3: %{pkgname}-%{version}-bundled-licenses.txt BuildArch: noarch BuildRequires: fdupes BuildRequires: pkgconfig(nodejs-22) BuildRequires: npm BuildRequires: typescript Requires: bash Requires: nodejs(engine) >= 22 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 %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/* ### 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 # This prints the help by default %{__nodejs} -e 'require("./")' | grep "^Version %{version}" %files -n %{pkgname} %license LICENSE %{pkgname}-%{version}-bundled-licenses.txt %doc README.md %{_bindir}/pnpm %{_bindir}/pnpx %{nodejs_sitearch}/pnpm %changelog * Thu Feb 06 2025 Brian J. Murrell - 10.2.1-1 - Update to 10.2.1 * Mon Feb 03 2025 Brian J. Murrell - 10.2.0-1 - Update to 10.2.0 * Sun Feb 02 2025 Brian J. Murrell - 9.15.5-1 - Update to 9.15.5 * Sun Jan 26 2025 Brian J. Murrell - 10.1.0-1 - Update to 10.1.0 * Mon Jan 20 2025 Brian J. Murrell - 9.15.4-3 - Add R: nodejs(engine) >= 22 * Mon Jan 20 2025 Brian J. Murrell - 9.15.4-2 - Build with nodejs 22 * Mon Jan 20 2025 Brian J. Murrell - 9.15.4-1 - Update to 9.15.4 * Mon Jan 20 2025 Brian J. Murrell - 9.15.3-2 - Build with nodejs 22 * Mon Jan 06 2025 Brian J. Murrell - 9.15.3-1 - Update to 9.15.3 ## START: Generated by rpmautospec * Fri Dec 27 2024 Brian J. Murrell - 9.15.2-1 - Update to version 9.15.2 * Wed Nov 13 2024 Andreas Schneider - 9.13.0-1 - Update to version 9.13.0 * Wed Sep 25 2024 Andreas Schneider - 9.11.0-1 - Update to version 9.11.0 * Thu Jul 18 2024 Fedora Release Engineering - 9.0.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Fri Apr 26 2024 Andreas Schneider - 9.0.6-1 - Update to version 9.0.6 * Thu Jan 25 2024 Fedora Release Engineering - 8.12.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 8.12.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Tue Dec 12 2023 Andreas Schneider - 8.12.0-1 - Initial package ## END: Generated by rpmautospec