merge bunjs-bin 1.0.6

This commit is contained in:
Noel Jacob
2023-10-13 22:18:59 +05:30
parent 9b5a2bebad
commit c53790268c
3 changed files with 52 additions and 15 deletions

View File

@@ -1,13 +1,16 @@
pkgbase = bun-bin pkgbase = bun-bin
pkgdesc = Incredibly fast JavaScript runtime, bundler, transpiler and package manager all in one. pkgdesc = All-in-one JavaScript runtime built for speed, with bundler, transpiler, test runner, and package manager. Includes bunx, shell completions and support for baseline CPUs
pkgver = 1.0.0 pkgver = 1.0.6
pkgrel = 1 pkgrel = 1
url = https://github.com/oven-sh/bun url = https://github.com/oven-sh/bun
arch = x86_64 arch = x86_64
arch = aarch64
license = MIT license = MIT
provides = bun=1.0.0
provides = bun provides = bun
source = bun-linux-x64-1.0.0.zip::https://github.com/oven-sh/bun/releases/download/bun-v1.0.0/bun-linux-x64.zip conflicts = bun
sha512sums = 1994efece2bfc02810d09f98d2bc00c885bfcfdf92f889c3fbdb0a3aab455153a46ecf325dc093ce6bc6d5d4ffc9eef4ded18ae0b25487abb86f43643b342be4 source_x86_64 = bun-x64-1.0.6.zip::https://github.com/oven-sh/bun/releases/download/bun-v1.0.6/bun-linux-x64.zip
sha256sums_x86_64 = 390fa3487b5db1366ca60c28cb4c2b9ed80d5fce659dd1f6742dc44c68892908
source_aarch64 = bun-aarch64-1.0.6.zip::https://github.com/oven-sh/bun/releases/download/bun-v1.0.6/bun-linux-aarch64.zip
sha256sums_aarch64 = 787b948237b79662ee0900bf4eed3e07adadeafbb94bc02f3d6c815dfc1c81d7
pkgname = bun-bin pkgname = bun-bin

1
.gitignore vendored
View File

@@ -1 +0,0 @@
*.zip

View File

@@ -1,14 +1,49 @@
# Maintainer: Noel Jacob <noeljacob91 at gmail dot com>
# Contributor: thdxr (original PKGBUILD)
# Contributor: 37h4n (aarch64 support added by Ethan Reece <aur at ethanreece dot com>)
# Contributor: sh!zeeg (shizeeque@gmail.com) support for non-avx2 CPUs, shell completions.
pkgname=bun-bin pkgname=bun-bin
pkgver=1.0.0 pkgver=1.0.6
pkgrel=1 pkgrel=1
pkgdesc="Incredibly fast JavaScript runtime, bundler, transpiler and package manager all in one." pkgdesc="All-in-one JavaScript runtime built for speed, with bundler, transpiler, test runner, and package manager. Includes bunx, shell completions and support for baseline CPUs"
arch=('x86_64') arch=('x86_64' 'aarch64')
url="https://github.com/oven-sh/bun" url="https://github.com/oven-sh/bun"
license=('MIT') license=('MIT')
provides=("bun=$pkgver" 'bun') provides=('bun')
source=("bun-linux-x64-${pkgver}.zip::https://github.com/oven-sh/bun/releases/download/bun-v${pkgver}/bun-linux-x64.zip") conflicts=('bun')
sha512sums=('1994efece2bfc02810d09f98d2bc00c885bfcfdf92f889c3fbdb0a3aab455153a46ecf325dc093ce6bc6d5d4ffc9eef4ded18ae0b25487abb86f43643b342be4') sha256sums_x86_64=('390fa3487b5db1366ca60c28cb4c2b9ed80d5fce659dd1f6742dc44c68892908')
sha256sums_aarch64=('787b948237b79662ee0900bf4eed3e07adadeafbb94bc02f3d6c815dfc1c81d7')
package() { _baseline=''
install -Dm755 "./bun-linux-x64/bun" "${pkgdir}/usr/bin/bun" _baseline_sha256sums='197e78c32f017b17e70bd329d475f28a668abe9bcf28b69f93873aba2fc6e70d'
if [[ $CARCH == 'x86_64' && $(cat /proc/cpuinfo | grep avx2) = '' ]];then
_baseline='-baseline'
sha256sums_x86_64=($_baseline_sha256sums)
fi
source_x86_64=("bun-x64-${pkgver}.zip::https://github.com/oven-sh/bun/releases/download/bun-v${pkgver}/bun-linux-x64${_baseline}.zip")
source_aarch64=("bun-aarch64-${pkgver}.zip::https://github.com/oven-sh/bun/releases/download/bun-v${pkgver}/bun-linux-aarch64.zip")
build() {
if [ "${CARCH}" == "aarch64" ]; then
cd "bun-linux-aarch64"
else
cd "bun-linux-x64${_baseline}"
fi
install -dm755 "completions"
SHELL=zsh "./bun" completions > "completions/bun.zsh"
SHELL=bash "./bun" completions > "completions/bun.bash"
SHELL=fish "./bun" completions > "completions/bun.fish"
}
package() {
if [ "${CARCH}" == "aarch64" ]; then
cd "bun-linux-aarch64"
install -Dm755 "./bun-linux-aarch64/bun" "${pkgdir}/usr/bin/bun"
else
cd "bun-linux-x64${_baseline}"
install -Dm755 "./bun" "${pkgdir}/usr/bin/bun"
fi
# simlink as bunx as in the official install.sh
ln -s bun "${pkgdir}/usr/bin/bunx"
install -Dm644 completions/bun.zsh "${pkgdir}/usr/share/zsh/site-functions/_bun"
install -Dm644 completions/bun.bash "${pkgdir}/usr/share/bash-completion/completions/bun"
install -Dm644 completions/bun.fish "${pkgdir}/usr/share/fish/vendor_completions.d/bun.fish"
} }