mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-17 02:16:39 +02:00
56 lines
1.8 KiB
Text
56 lines
1.8 KiB
Text
# Contributor: Fabricio Silva <hi@fabricio.dev>
|
|
# Maintainer: Fabricio Silva <hi@fabricio.dev>
|
|
pkgname=fnm
|
|
pkgver=1.38.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
|
|
depends="libstdc++" # required for the nodejs
|
|
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="
|
|
a15a57980c0aa8a2246c6d1160e6ee92c3f31441070a541e2bab4c3d3b5b6b5eda5689911748b7d45ebf8ac6d204cccb0fc7f28c7c9cd9249870a0d3f99b0cea fnm-1.38.1.tar.gz
|
|
b2a33a8a5b0ece33fc560cbef1239817142f0b40acfd41f849e945b92477805bcfb95d3f93b7642138057ea0104ac37989c1120b64a9f6bb7661daa4c7f5fd91 mirror.patch
|
|
54a2d359a51e9ed34054f1062ad7fe8abfe5e3f597caf3fca17cc543958dd236e0f2d297541eb78d58ca6ad37e43dac444b673c4aaffee9036ef530cad9bde80 musl.patch
|
|
"
|