[d/bun-bin] added
This commit is contained in:
parent
400cbe8e60
commit
e7bec0668b
1 changed files with 61 additions and 0 deletions
61
d/bun-bin/SlackBuild
Executable file
61
d/bun-bin/SlackBuild
Executable file
|
@ -0,0 +1,61 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
CWD=$(pwd)
|
||||
|
||||
PRGNAM=$(basename $CWD)
|
||||
ARCH=$(uname -m)
|
||||
BUILD=2 # add completions
|
||||
|
||||
TAG=gwh
|
||||
OUTPUT=/tmp
|
||||
TMP=/tmp/$TAG
|
||||
PKG=$TMP/pkg-$PRGNAM
|
||||
PREFIX=/usr
|
||||
|
||||
VERSION=${VERSION:-$(curl -s https://api.github.com/repos/Jarred-Sumner/bun/tags | jq -r '.[0].name')}
|
||||
|
||||
REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/_repositories/$PRGNAM}
|
||||
|
||||
BINARCH=x64
|
||||
|
||||
mkdir -p $REPOSITORY
|
||||
|
||||
# cleaning
|
||||
rm -fr $PKG
|
||||
|
||||
# download
|
||||
[ ! -e $REPOSITORY/bun-linux-${BINARCH}-${VERSION}.zip ] && wget -c https://github.com/Jarred-Sumner/bun/releases/download/bun-${VERSION}/bun-linux-${BINARCH}.zip -O $REPOSITORY/bun-linux-${BINARCH}-${VERSION}.zip
|
||||
|
||||
# installation
|
||||
mkdir -p $PKG/usr
|
||||
cd $PKG/usr/
|
||||
unzip $REPOSITORY/bun-linux-${BINARCH}-${VERSION}.zip
|
||||
mv bun-linux-${BINARCH} bin
|
||||
chmod +x bin/bun
|
||||
|
||||
mkdir -p $PKG/usr/share/zsh/site-functions
|
||||
$PKG/usr/bin/bun completions > $PKG/usr/share/zsh/site-functions/_bun
|
||||
|
||||
# packaging
|
||||
cd $PKG
|
||||
chown -R root:root *
|
||||
|
||||
mkdir install
|
||||
cat <<EOF > install/slack-desc
|
||||
$PRGNAM: $PRGNAM (Incredibly fast JavaScript runtime, bundler, transpiler and package manager)
|
||||
$PRGNAM:
|
||||
$PRGNAM: Bun is a fast all-in-one JavaScript runtime
|
||||
$PRGNAM:
|
||||
$PRGNAM: Bundle, transpile, install and run JavaScript & TypeScript projects — all in Bun.
|
||||
$PRGNAM: Bun is a new JavaScript runtime with a native bundler, transpiler, task runner and
|
||||
$PRGNAM: npm client built-in.
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM:
|
||||
$PRGNAM: https://bun.sh/
|
||||
EOF
|
||||
|
||||
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.txz
|
Loading…
Reference in a new issue