blob: 6fdc79a030bdc0ffa65aadcb7b83204dda4e8986 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# Maintainer: Wesley Moore <wes@wezm.net>
pkgname=fnm
pkgver=1.38.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=('c24e4c26183a4d88a33e343902ed2d45da23e78c66b2a696a7420eb86deddda9')
build() {
cd "$pkgname-$pkgver"
CFLAGS+=' -ffat-lto-objects' 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
}
|