mirror of
https://github.com/terrapkg/packages.git
synced 2026-05-31 09:01:55 +00:00
* add: NVM
* chore: Packager and changelog
(cherry picked from commit 2896419ba2)
Co-authored-by: Gilver <rockgrub@disroot.org>
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
project pkg {
|
||||
arches = ["x86_64"]
|
||||
rpm {
|
||||
spec = "nvm.spec"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/sh
|
||||
|
||||
source /etc/profile.d/nvm.sh
|
||||
|
||||
nvm $@
|
||||
@@ -0,0 +1,42 @@
|
||||
Name: nvm
|
||||
Version: 0.40.3
|
||||
Release: 1%{?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
|
||||
# Only works with POSIX compliant shells
|
||||
Requires: (bash or dash or ksh or zsh)
|
||||
BuildArch: noarch
|
||||
Packager: Gilver E. <rockgrub@disroot.org>
|
||||
|
||||
%description
|
||||
POSIX-compliant script to manage multiple active Node.js versions.
|
||||
|
||||
%pkg_completion -bz
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version}
|
||||
|
||||
%build
|
||||
# Anyone home?
|
||||
|
||||
%install
|
||||
install -Dm744 %{SOURCE1} %{buildroot}%{_bindir}/%{name}
|
||||
|
||||
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}
|
||||
|
||||
install -Dm644 %{name}.sh -t %{buildroot}%{_sysconfdir}/profile.d
|
||||
|
||||
%files
|
||||
%license LICENSE.md
|
||||
%doc README.md
|
||||
%{_bindir}/%{name}
|
||||
%{_sysconfdir}/profile.d/%{name}.sh
|
||||
|
||||
%changelog
|
||||
* Sun Nov 30 2025 Gilver E. <rockgrub@disroot.org> - 0.40.3-1
|
||||
- Initial package
|
||||
@@ -0,0 +1 @@
|
||||
rpm.version(find(`nvm_echo \"v([\d.]+)\"`, gh_rawfile("nvm-sh/nvm", "master", "install.sh"), 1));
|
||||
Reference in New Issue
Block a user