bigbluebutton-Github/build/packages-template/bbb-html5-nodejs/build.sh

38 lines
904 B
Bash
Raw Normal View History

#!/bin/bash -ex
TARGET=`basename $(pwd)`
PACKAGE=$(echo $TARGET | cut -d'_' -f1)
VERSION=$(echo $TARGET | cut -d'_' -f2)
DISTRO=$(echo $TARGET | cut -d'_' -f3)
2023-05-03 02:13:11 +08:00
NODE_VERSION="14.21.3"
NODE_DIRNAME="node-v${NODE_VERSION}-linux-x64"
#
# Clean up directories
rm -rf staging
pushd .
mkdir -p staging/usr/lib/bbb-html5/node
cd staging/usr/lib/bbb-html5/node
2023-05-03 02:53:05 +08:00
wget --waitretry=30 --timeout=20 --retry-connrefused --retry-on-host-error --retry-on-http-error=404,522 https://static.meteor.com/dev-bundle-node-os/v${NODE_VERSION}/${NODE_DIRNAME}.tar.gz
if [ -f ${NODE_DIRNAME}.tar.gz ]; then
tar xfz ${NODE_DIRNAME}.tar.gz
mv ${NODE_DIRNAME}/* .
rmdir ${NODE_DIRNAME}
rm ${NODE_DIRNAME}.tar.gz
fi
popd
##
fpm -s dir -t deb -C ./staging -n $PACKAGE \
--version $VERSION --epoch $EPOCH \
--description "Include a specific NodeJS version for bbb-html5" \
$DIRECTORIES \
$OPTS