bigbluebutton-Github/build/packages-template/bbb-libreoffice-docker/build.sh

46 lines
1.4 KiB
Bash
Raw Normal View History

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)
2022-09-01 23:40:01 +08:00
DIRS="/usr/share/bbb-libreoffice /usr/share/bbb-libreoffice-conversion"
2021-08-13 18:53:18 +08:00
for dir in $DIRS; do
mkdir -p staging$dir
DIRECTORIES="$DIRECTORIES --directories $dir"
done
##
if [ $DISTRO != "amzn2" ]; then
mkdir -p staging/etc/sudoers.d
cp assets/zzz-bbb-docker-libreoffice staging/etc/sudoers.d/zzz-bbb-docker-libreoffice
fi
cp assets/etherpad-export.sh staging/usr/share/bbb-libreoffice-conversion/etherpad-export.sh
cp assets/convert-local.sh staging/usr/share/bbb-libreoffice-conversion/convert-local.sh
cp assets/convert-remote.sh staging/usr/share/bbb-libreoffice-conversion/convert-remote.sh
chmod +x staging/usr/share/bbb-libreoffice-conversion/convert-local.sh
chmod +x staging/usr/share/bbb-libreoffice-conversion/convert-remote.sh
chmod +x staging/usr/share/bbb-libreoffice-conversion/etherpad-export.sh
cp -r docker staging/usr/share/bbb-libreoffice
##
. ./opts-$DISTRO.sh
fpm -s dir -C ./staging -n $PACKAGE \
--version $VERSION --epoch $EPOCH \
--after-install after-install.sh \
--before-remove before-remove.sh \
--after-remove after-remove.sh \
--description "BigBlueButton setup for LibreOffice running in docker" \
$DIRECTORIES \
$OPTS