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
set +e
2022-03-12 05:04:42 +08:00
2022-03-13 04:53:17 +08:00
# as of March 12, 2022, circa BigBlueButton 2.5-alpha4, we set npm by default to 8.5.0
# however, it seems bbb-etherpad has troubles building with npm as high.
# Setting npm to 6.14.11 which was used successfully for building in BigBlueButton 2.4.x
npm -v
npm i -g npm@6.14.11
npm -v
2022-03-12 05:04:42 +08:00
ls -l node_modules/
ls -l node_modules/ep_etherpad-lite
ls -l src/
# rm -f node_modules/ep_etherpad-lite/package.json # Was preventing npm ci running, see https://github.com/ether/etherpad-lite/issues/4962#issuecomment-916642078
2021-08-13 18:53:18 +08:00
bin/installDeps.sh
set -e
2022-03-12 02:45:01 +08:00
rm -rf ep_pad_ttl
2021-12-17 01:55:26 +08:00
git clone https://github.com/mconf/ep_pad_ttl.git
2021-08-13 18:53:18 +08:00
npm pack ./ep_pad_ttl
npm install ./ep_pad_ttl-*.tgz
2022-03-12 02:45:01 +08:00
rm -rf bbb-etherpad-plugin
2021-08-13 18:53:18 +08:00
git clone https://github.com/alangecker/bbb-etherpad-plugin.git
npm pack ./bbb-etherpad-plugin
npm install ./ep_bigbluebutton_patches-*.tgz
2022-03-12 02:45:01 +08:00
rm -rf ep_redis_publisher
2021-08-13 18:53:18 +08:00
git clone https://github.com/mconf/ep_redis_publisher.git
npm pack ./ep_redis_publisher
npm install ./ep_redis_publisher-*.tgz
2021-12-20 22:35:43 +08:00
npm install ep_cursortrace
2021-08-13 18:53:18 +08:00
npm install ep_disable_chat
2022-05-16 03:48:05 +08:00
npm install --no-save --legacy-peer-deps ep_auth_session
2021-08-13 18:53:18 +08:00
mkdir -p staging/usr/share/etherpad-lite
cp -r CHANGELOG.md CONTRIBUTING.md LICENSE README.md bin doc src tests var node_modules staging/usr/share/etherpad-lite
cp settings.json staging/usr/share/etherpad-lite
git clone https://github.com/alangecker/bbb-etherpad-skin.git staging/usr/share/etherpad-lite/src/static/skins/bigbluebutton
mkdir -p staging/usr/lib/systemd/system
cp etherpad.service staging/usr/lib/systemd/system
2022-03-06 11:51:27 +08:00
mkdir -p staging/usr/share/bigbluebutton/nginx
cp notes.nginx staging/usr/share/bigbluebutton/nginx
2021-08-13 18:53:18 +08:00
rm -rf staging/usr/share/etherpad-lite/src/static/skins/bigbluebutton/.git
##
. ./opts-$DISTRO .sh
#
# Build RPM package
fpm -s dir -C ./staging -n $PACKAGE \
--version $VERSION --epoch $EPOCH \
--before-install before-install.sh \
--after-install after-install.sh \
--before-remove before-remove.sh \
--after-remove after-remove.sh \
--description "The EtherPad Lite components for BigBlueButton" \
$DIRECTORIES \
2023-09-01 20:19:50 +08:00
$OPTS \
2023-09-02 18:49:29 +08:00
-d 'nodejs (>= 18)' -d 'nodejs (<< 20)'
2021-08-13 18:53:18 +08:00