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

51 lines
1.6 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)
DIRS="/usr/share/bbb-libreoffice /lib/systemd/system /usr/share/bbb-libreoffice-conversion"
for dir in $DIRS; do
mkdir -p staging$dir
DIRECTORIES="$DIRECTORIES --directories $dir"
done
##
# Older version
#cp assets/bbb-libreoffice.service staging/lib/systemd/system/bbb-libreoffice@.service
#cp assets/libreoffice_container.sh staging/usr/share/bbb-libreoffice
#chmod 700 staging/usr/share/bbb-libreoffice/libreoffice_container.sh
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