## START: Set by rpmautospec ## (rpmautospec version 0.3.8) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; 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: 8.12.0 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: nodejs-devel BuildRequires: npm BuildRequires: typescript Requires: bash 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 node_modules yet. mv %{buildroot}$(dirname %{nodejs_sitearch})/node_modules/%{pkgname} %{buildroot}%{nodejs_sitearch} ### CLEANUP # Remove backup rm %{buildroot}%{nodejs_sitelib}/pnpm/dist/node_modules/console-control-strings/README.md~ # Remove hidden files find %{buildroot}%{nodejs_sitelib}/pnpm/dist/node_modules -type f -name '.*' -delete # Remove hidden directories rm -rf %{buildroot}%{nodejs_sitelib}/pnpm/dist/node_modules/.pnpm rm -rf %{buildroot}%{nodejs_sitelib}/pnpm/dist/node_modules/balanced-match/.github rm -rf %{buildroot}%{nodejs_sitelib}/pnpm/dist/node_modules/cacache/node_modules/brace-expansion/.github rm -rf %{buildroot}%{nodejs_sitelib}/pnpm/dist/node_modules/iconv-lite/.github rm -rf %{buildroot}%{nodejs_sitelib}/pnpm/dist/node_modules/iconv-lite/.idea rm -rf %{buildroot}%{nodejs_sitelib}/pnpm/dist/node_modules/node-gyp/.github rm -rf %{buildroot}%{nodejs_sitelib}/pnpm/dist/node_modules/node-gyp/gyp/.github %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 ## START: Generated by rpmautospec * Tue Dec 12 2023 Andreas Schneider - 8.12.0-3 - Fix AND in License tag * Tue Dec 12 2023 Andreas Schneider - 8.12.0-2 - Fix License tag * Tue Dec 12 2023 Andreas Schneider - 8.12.0-1 - Initial package ## END: Generated by rpmautospec