2021-08-13 18:53:18 +08:00
|
|
|
#!/bin/bash -ex
|
|
|
|
|
|
|
|
TARGET=`basename $(pwd)`
|
|
|
|
|
|
|
|
|
|
|
|
PACKAGE=$(echo $TARGET | cut -d'_' -f1)
|
|
|
|
VERSION=$(echo $TARGET | cut -d'_' -f2)
|
|
|
|
DISTRO=$(echo $TARGET | cut -d'_' -f3)
|
|
|
|
TAG=$(echo $TARGET | cut -d'_' -f4)
|
|
|
|
|
|
|
|
#
|
|
|
|
# Clean up directories
|
|
|
|
|
|
|
|
rm -rf staging
|
|
|
|
|
|
|
|
#
|
|
|
|
# Package
|
|
|
|
|
|
|
|
BBB_PLAYBACK_VERSION=2.3
|
|
|
|
BBB_PLAYBACK_HOMEPAGE=playback/presentation
|
|
|
|
BBB_PLAYBACK_BASE=staging/var/bigbluebutton/$BBB_PLAYBACK_HOMEPAGE
|
|
|
|
BBB_PLAYBACK=$BBB_PLAYBACK_BASE/$BBB_PLAYBACK_VERSION
|
|
|
|
if ! which sponge ; then
|
|
|
|
apt-get -y install moreutils
|
|
|
|
fi
|
|
|
|
jq '.styles.url = "/playback/presentation/2.3"' src/config.json | sponge src/config.json
|
|
|
|
|
|
|
|
export REACT_APP_BBB_PLAYBACK_BUILD=$(git rev-parse --short HEAD)
|
|
|
|
|
|
|
|
npm install
|
|
|
|
npm run-script build
|
2024-07-03 00:06:03 +08:00
|
|
|
grep \"version\"\: package.json | sed -e 's|.*\ \"||g' -e 's|\".*||g' > bbb-playback-version
|
|
|
|
mkdir -p $BBB_PLAYBACK
|
2024-07-17 00:37:57 +08:00
|
|
|
cp -r ./build/* bbb-playback-version $BBB_PLAYBACK
|
2021-08-13 18:53:18 +08:00
|
|
|
|
|
|
|
|
2022-03-06 11:51:27 +08:00
|
|
|
mkdir -p staging/usr/share/bigbluebutton/nginx
|
|
|
|
cp playback.nginx staging/usr/share/bigbluebutton/nginx
|
2021-08-13 18:53:18 +08:00
|
|
|
|
|
|
|
##
|
|
|
|
|
|
|
|
. ./opts-$DISTRO.sh
|
|
|
|
|
|
|
|
#
|
|
|
|
# Build RPM package
|
|
|
|
|
|
|
|
fpm -s dir -C ./staging -n $PACKAGE \
|
|
|
|
--version $VERSION --epoch $EPOCH \
|
|
|
|
--after-install after-install.sh \
|
2023-08-11 02:21:54 +08:00
|
|
|
--description "Player for BigBlueButton presentation format recordings" \
|
2021-08-13 18:53:18 +08:00
|
|
|
$DIRECTORIES \
|
|
|
|
$OPTS
|