mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-04-09 15:51:45 +02:00
56 lines
1.7 KiB
Plaintext
56 lines
1.7 KiB
Plaintext
# Contributor: Fabricio Silva <hi@fabricio.dev>
|
|
# Maintainer: Fabricio Silva <hi@fabricio.dev>
|
|
pkgname=fnm
|
|
pkgver=1.37.1
|
|
pkgrel=0
|
|
pkgdesc="Fast and simple Node.js version manager, built in Rust"
|
|
url="https://github.com/Schniz/fnm"
|
|
license="GPL-3.0-or-later"
|
|
arch="x86_64" # unofficial does only musl for x86_64
|
|
makedepends="cargo cargo-auditable"
|
|
checkdepends="bash procps-ng"
|
|
subpackages="
|
|
$pkgname-bash-completion
|
|
$pkgname-fish-completion
|
|
$pkgname-zsh-completion
|
|
"
|
|
install="$pkgname.post-install"
|
|
source="https://github.com/Schniz/fnm/archive/v$pkgver/fnm-$pkgver.tar.gz
|
|
mirror.patch
|
|
musl.patch
|
|
"
|
|
options="net" # Required to download Rust crates
|
|
|
|
export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
|
|
|
|
prepare() {
|
|
default_prepare
|
|
cargo fetch --target="$CTARGET" --locked
|
|
}
|
|
|
|
build() {
|
|
cargo auditable build --release --frozen
|
|
|
|
for i in bash fish zsh; do
|
|
./target/release/fnm completions --shell $i > fnm-completions.$i
|
|
done
|
|
}
|
|
|
|
check() {
|
|
cargo test --frozen
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 target/release/fnm -t "$pkgdir"/usr/bin/
|
|
|
|
install -Dm644 fnm-completions.bash "$pkgdir"/usr/share/bash-completion/completions/fnm
|
|
install -Dm644 fnm-completions.fish "$pkgdir"/usr/share/fish/vendor_completions.d/fnm.fish
|
|
install -Dm644 fnm-completions.zsh "$pkgdir"/usr/share/zsh/site-functions/_fnm
|
|
}
|
|
|
|
sha512sums="
|
|
2714f3e35e5b9fccd71d6c6ee718c1377e56d65338bc11c47283756607613742cec5ac9370ae1f8148d91bfff9b10dad6793ff7322192f031d975e2abb528924 fnm-1.37.1.tar.gz
|
|
cb9cca0c287798d6b75eb49e31beb80de083b77f0b80d5d0450a3c789f9b2020842a587fa5cb4586c518748a9f7ddd004fc06873b71fbe40b11ec5339229a503 mirror.patch
|
|
c09cff7e16fffbd25ef271f04be34f50b4a0496dd4ff03c0484fae0e841039b7d063129cfcf679c0d629952ce9b23722398a5e55b93d3f827cbbc6bca205bbdb musl.patch
|
|
"
|