build: packaging for bbb-export-annotations

This commit is contained in:
Anton Georgiev 2022-07-06 20:51:57 +00:00
parent 5a8cce6667
commit aa38cca17f
7 changed files with 78 additions and 0 deletions

View File

@ -4,6 +4,7 @@ DEBNAME_TO_SOURCEDIR[bbb-apps-akka]="akka-bbb-apps bbb-common-message"
DEBNAME_TO_SOURCEDIR[bbb-config]="bigbluebutton-config"
DEBNAME_TO_SOURCEDIR[bbb-demo]="bbb-api-demo"
DEBNAME_TO_SOURCEDIR[bbb-etherpad]="bbb-etherpad"
DEBNAME_TO_SOURCEDIR[bbb-export-annotations]="bbb-export-annotations"
DEBNAME_TO_SOURCEDIR[bbb-freeswitch-core]="freeswitch bbb-voice-conference"
DEBNAME_TO_SOURCEDIR[bbb-freeswitch-sounds]="do_not_copy_anything"
DEBNAME_TO_SOURCEDIR[bbb-fsesl-akka]="akka-bbb-fsesl bbb-common-message bbb-fsesl-client"

View File

@ -0,0 +1,14 @@
#!/bin/bash -e
case "$1" in
configure|upgrade|1|2)
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac

View File

@ -0,0 +1,16 @@
[Unit]
Description=BigBlueButton Export Annotations
Wants=redis.service
After=syslog.target network.target
[Service]
WorkingDirectory=/usr/local/bigbluebutton/bbb-export-annotations
ExecStart=/usr/bin/node master.js
Restart=always
SyslogIdentifier=bbb-export-annotations
User=bigbluebutton
Group=bigbluebutton
Environment=NODE_ENV=production
[Install]
WantedBy=multi-user.target

View File

@ -0,0 +1,3 @@
#!/bin/bash -e
stopService bbb-export-annotations || echo "bbb-export-annotations could not be unregistered or stopped"

View File

@ -0,0 +1,40 @@
#!/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
mkdir -p staging/usr/local/bigbluebutton/bbb-export-annotations
pushd .
cd staging/usr/local/bigbluebutton/bbb-export-annotations/
npm install --production
popd
mkdir -p staging/usr/lib/systemd/system
cp bbb-export-annotations.service staging/usr/lib/systemd/system
##
. ./opts-$DISTRO.sh
#
# Build package
fpm -s dir -C ./staging -n $PACKAGE \
--version $VERSION --epoch $EPOCH \
--after-install after-install.sh \
--before-remove before-remove.sh \
--description "BigBlueButton Export Annotations" \
$DIRECTORIES \
$OPTS

View File

@ -0,0 +1,3 @@
. ./opts-global.sh
OPTS="$OPTS -t deb -d nodejs,npm,bbb-apps-akka,bbb-web"

View File

@ -16,6 +16,7 @@ fi
PKGS="bbb-apps-akka
bbb-config
bbb-etherpad
bbb-export-annotations
bbb-freeswitch-core
bbb-freeswitch-sounds
bbb-fsesl-akka