2021-08-13 18:53:18 +08:00
|
|
|
#!/bin/bash -ex
|
|
|
|
|
|
|
|
TARGET=`basename $(pwd)`
|
|
|
|
|
2022-02-15 01:49:14 +08:00
|
|
|
# inject dependency to bigbluebutton.target
|
|
|
|
for unit in freeswitch nginx redis-server; do
|
2022-09-01 19:56:35 +08:00
|
|
|
mkdir -p "staging/usr/lib/systemd/system/${unit}.service.d"
|
|
|
|
cp bigbluebutton.conf "staging/usr/lib/systemd/system/${unit}.service.d/"
|
2022-02-15 01:49:14 +08:00
|
|
|
done
|
|
|
|
|
2021-08-13 18:53:18 +08:00
|
|
|
|
|
|
|
PACKAGE=$(echo $TARGET | cut -d'_' -f1)
|
|
|
|
VERSION=$(echo $TARGET | cut -d'_' -f2)
|
|
|
|
DISTRO=$(echo $TARGET | cut -d'_' -f3)
|
|
|
|
|
|
|
|
#
|
|
|
|
# Clear staging directory for build
|
|
|
|
rm -rf staging
|
|
|
|
|
|
|
|
#
|
|
|
|
# Create build directories for markign by fpm
|
|
|
|
DIRS="/etc/bigbluebutton \
|
2022-09-01 19:56:35 +08:00
|
|
|
/usr/lib/systemd/system \
|
2021-08-13 18:53:18 +08:00
|
|
|
/var/bigbluebutton/blank \
|
|
|
|
/usr/share/bigbluebutton/blank \
|
2022-06-22 03:56:12 +08:00
|
|
|
/var/www/bigbluebutton-default/assets"
|
2021-08-13 18:53:18 +08:00
|
|
|
for dir in $DIRS; do
|
|
|
|
mkdir -p staging$dir
|
|
|
|
DIRECTORIES="$DIRECTORIES --directories $dir"
|
|
|
|
done
|
|
|
|
|
|
|
|
cp bigbluebutton-release staging/etc/bigbluebutton
|
|
|
|
cp slides/nopdfmark.ps staging/etc/bigbluebutton
|
|
|
|
|
|
|
|
# XXX remove /var/bigbluebutton
|
|
|
|
cp slides/blank* staging/var/bigbluebutton/blank
|
|
|
|
cp slides/blank* staging/usr/share/bigbluebutton/blank
|
|
|
|
|
2022-06-22 03:56:12 +08:00
|
|
|
cp -r assets/* staging/var/www/bigbluebutton-default/assets
|
2021-08-13 18:53:18 +08:00
|
|
|
|
|
|
|
mkdir -p staging/usr/bin
|
|
|
|
cp bin/bbb-conf bin/bbb-record staging/usr/bin
|
|
|
|
chmod +x staging/usr/bin/bbb-conf
|
|
|
|
|
|
|
|
mkdir -p staging/etc/bigbluebutton/bbb-conf
|
2023-02-25 00:36:12 +08:00
|
|
|
mkdir -p staging/usr/lib/bbb-conf
|
|
|
|
cp bin/apply-lib.sh staging/usr/lib/bbb-conf
|
2021-08-13 18:53:18 +08:00
|
|
|
|
|
|
|
mkdir -p staging/etc/cron.daily
|
|
|
|
cp cron.daily/* staging/etc/cron.daily
|
|
|
|
|
|
|
|
mkdir -p staging/etc/cron.hourly
|
|
|
|
cp cron.hourly/bbb-resync-freeswitch staging/etc/cron.hourly
|
|
|
|
|
2022-04-05 04:30:49 +08:00
|
|
|
mkdir -p staging/usr/share/bigbluebutton/nginx
|
|
|
|
|
|
|
|
cp include_default.nginx staging/usr/share/bigbluebutton/
|
|
|
|
|
2022-09-01 19:56:35 +08:00
|
|
|
cp bigbluebutton.target staging/usr/lib/systemd/system/
|
2021-08-13 18:53:18 +08:00
|
|
|
|
|
|
|
. ./opts-$DISTRO.sh
|
|
|
|
|
|
|
|
#
|
|
|
|
# Build package
|
|
|
|
fpm -s dir -C ./staging -n $PACKAGE \
|
|
|
|
--version $VERSION --epoch $EPOCH \
|
|
|
|
--after-install after-install.sh \
|
2022-04-05 04:30:49 +08:00
|
|
|
--after-remove after-remove.sh \
|
2022-07-13 04:57:34 +08:00
|
|
|
--before-install before-install.sh \
|
2021-08-13 18:53:18 +08:00
|
|
|
--description "BigBlueButton configuration utilities" \
|
|
|
|
$DIRECTORIES \
|
2023-04-27 04:26:51 +08:00
|
|
|
$OPTS
|