52112cde87
Sometimes operators need to tweak the nginx config. They should not modify config files provided by the packages. Instead they should add their own config files in `/etc/bigbluebutton/nginx/`. This patch links the default config provided by packages into this directory.
87 lines
2.1 KiB
Bash
Executable File
87 lines
2.1 KiB
Bash
Executable File
#!/bin/bash -ex
|
|
|
|
TARGET=`basename $(pwd)`
|
|
|
|
|
|
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 \
|
|
/var/bigbluebutton/blank \
|
|
/usr/share/bigbluebutton/blank \
|
|
/var/www/bigbluebutton-default"
|
|
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
|
|
|
|
cp -r web/* staging/var/www/bigbluebutton-default
|
|
|
|
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
|
|
cp bin/apply-lib.sh staging/etc/bigbluebutton/bbb-conf
|
|
|
|
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
|
|
|
|
mkdir -p staging/usr/share/bigbluebutton/nginx
|
|
|
|
cp include_default.nginx staging/usr/share/bigbluebutton/
|
|
|
|
# Overrides
|
|
|
|
mkdir -p staging/etc/systemd/system/bbb-apps-akka.service.d
|
|
cat > staging/etc/systemd/system/bbb-apps-akka.service.d/override.conf <<HERE
|
|
[Unit]
|
|
Wants=redis-server.service
|
|
After=redis-server.service
|
|
HERE
|
|
|
|
mkdir -p staging/etc/systemd/system/bbb-fsesl-akka.service.d
|
|
cat > staging/etc/systemd/system/bbb-fsesl-akka.service.d/override.conf <<HERE
|
|
[Unit]
|
|
Wants=redis-server.service
|
|
After=redis-server.service
|
|
HERE
|
|
|
|
|
|
mkdir -p staging/etc/systemd/system/bbb-transcode-akka.service.d
|
|
cat > staging/etc/systemd/system/bbb-transcode-akka.service.d/override.conf <<HERE
|
|
[Unit]
|
|
Wants=redis-server.service
|
|
After=redis-server.service
|
|
HERE
|
|
|
|
|
|
. ./opts-$DISTRO.sh
|
|
|
|
#
|
|
# Build package
|
|
fpm -s dir -C ./staging -n $PACKAGE \
|
|
--version $VERSION --epoch $EPOCH \
|
|
--after-install after-install.sh \
|
|
--after-remove after-remove.sh \
|
|
--description "BigBlueButton configuration utilities" \
|
|
$DIRECTORIES \
|
|
$OPTS
|