Files
packages/anda/tools/nvm/nvm.spec
T
Gilver 651b7f63c7 chore: Mass update email in Roachy's specs (#9355) (#9405)
* chore: Mass update email in Roachy's specs

* fix(pokeshell): Recommends



* chore: Bump releases

* Update xone.spec



* Update falcond-gui.spec



* Update ghostty-nightly.spec



* Update ghostty.spec



* Update epsonscan2.spec



* Update neovim-default-editor.spec



---------


(cherry picked from commit ce4d5269c0)

Signed-off-by: Gilver <roachy@fyralabs.com>
Signed-off-by: GildedRoach <GildedRoach@users.noreply.github.com>
2026-01-20 20:33:05 -06:00

52 lines
1.5 KiB
RPMSpec

Name: nvm
Version: 0.40.3
Release: 6%{?dist}
Summary: Node Version Manager
License: MIT
URL: https://github.com/nvm-sh/nvm
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz
Source1: binscript
# Make sure NVM always chooses "$HOME/.nvm" as the directory for local files unless explicitly set otherwise
Patch0: nvm-always-use-default-dir.patch
# Only works with POSIX compliant shells
Requires: bash
BuildArch: noarch
Packager: Gilver E. <roachy@fyralabs.com>
%description
POSIX-compliant script to manage multiple active Node.js versions.
%pkg_completion -bz
%prep
%autosetup -n %{name}-%{version} -p1
%build
# Anyone home?
%install
install -Dm755 %{SOURCE1} %{buildroot}%{_bindir}/%{name}
# Give nvm-exec the correct search directory
sed -i 's|DIR=.*|DIR="%{_sysconfdir}/profile.d"|g' nvm-exec
install -Dm755 nvm-exec -t %{buildroot}%{_bindir}
install -Dm644 bash_completion %{buildroot}%{bash_completions_dir}/%{name}.bash
# Another cursed script that uses bashcompinit to use one file for Bash and Zsh completions
install -Dm644 bash_completion %{buildroot}%{zsh_completions_dir}/_%{name}
# Make NVM expect nvm-exec in the bindir
sed -i 's|${NVM_DIR}/nvm-exec|%{_bindir}/nvm-exec|g' %{name}.sh
install -Dm644 %{name}.sh -t %{buildroot}%{_sysconfdir}/profile.d
%files
%license LICENSE.md
%doc README.md
%{_bindir}/%{name}
%{_bindir}/%{name}-exec
%{_sysconfdir}/profile.d/%{name}.sh
%changelog
* Sun Nov 30 2025 Gilver E. <rockgrub@disroot.org> - 0.40.3-1
- Initial package