2022-07-07 04:51:57 +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)
|
|
|
|
TAG=$(echo $TARGET | cut -d'_' -f4)
|
|
|
|
|
|
|
|
#
|
|
|
|
# Clean up directories
|
|
|
|
rm -rf staging
|
|
|
|
|
|
|
|
#
|
|
|
|
# package
|
|
|
|
|
|
|
|
mkdir -p staging/usr/local/bigbluebutton/bbb-export-annotations
|
2023-03-11 02:41:12 +08:00
|
|
|
mkdir -p staging/usr/local/share/fonts/
|
2022-07-07 04:51:57 +08:00
|
|
|
|
2022-07-08 13:13:59 +08:00
|
|
|
find -maxdepth 1 ! -path . ! -name staging $(printf "! -name %s " $(cat .build-files)) -exec cp -r {} staging/usr/local/bigbluebutton/bbb-export-annotations/ \;
|
|
|
|
|
2022-07-07 04:51:57 +08:00
|
|
|
pushd .
|
|
|
|
cd staging/usr/local/bigbluebutton/bbb-export-annotations/
|
|
|
|
npm install --production
|
2024-05-28 22:24:27 +08:00
|
|
|
chmod -R a+rX .
|
2022-07-07 04:51:57 +08:00
|
|
|
popd
|
|
|
|
|
|
|
|
mkdir -p staging/usr/lib/systemd/system
|
|
|
|
cp bbb-export-annotations.service staging/usr/lib/systemd/system
|
|
|
|
|
2023-03-07 21:26:03 +08:00
|
|
|
#
|
|
|
|
# Install fonts
|
2023-03-07 22:34:57 +08:00
|
|
|
cp fonts/* staging/usr/local/share/fonts/
|
2024-05-28 22:24:27 +08:00
|
|
|
chmod -R a+rX staging/usr/local/share/fonts/
|
2023-03-07 21:26:03 +08:00
|
|
|
|
2022-07-07 04:51:57 +08:00
|
|
|
##
|
|
|
|
|
|
|
|
. ./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 \
|
2023-09-01 20:19:50 +08:00
|
|
|
$OPTS \
|
2024-08-10 01:58:44 +08:00
|
|
|
-d 'nodejs (>= 18)' -d 'nodejs (<< 23)'
|
2022-07-07 04:51:57 +08:00
|
|
|
|