# Maintainer: Wesley Moore pkgname=fnm pkgver=1.35.1 pkgrel=1 pkgdesc="Fast and simple Node.js version manager, built with Rust" arch=('x86_64') url="https://github.com/Schniz/fnm" license=('GPL3') depends=('xz' 'bzip2' 'gcc-libs') makedepends=('cargo') conflicts=('fnm-bin') source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz") sha256sums=('df0f010f20e6072a8a52365f195cc94c35ebaf486cc285948e10eabf768d17ba') options=('!lto') build() { cd "$pkgname-$pkgver" CARGO_TARGET_DIR=target cargo build --release --locked } package() { install -Dm755 "$srcdir/$pkgname-$pkgver/target/release/$pkgname" "$pkgdir/usr/bin/$pkgname" mkdir -p \ "$pkgdir"/usr/share/bash-completion/completions \ "$pkgdir"/usr/share/fish/vendor_completions.d \ "$pkgdir"/usr/share/zsh/site-functions "$pkgdir/usr/bin/$pkgname" completions --shell bash > "$pkgdir"/usr/share/bash-completion/completions/$pkgname "$pkgdir/usr/bin/$pkgname" completions --shell fish > "$pkgdir"/usr/share/fish/vendor_completions.d/$pkgname.fish "$pkgdir/usr/bin/$pkgname" completions --shell zsh > "$pkgdir"/usr/share/zsh/site-functions/_$pkgname }