packaging/flatpak/build.sh

24 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# checkout the flathub shared-modules, needed for the VLC build
git submodule update --init --recursive
# build PyMuPdf dependency file
PYMUPDF_VER=1.23.22
PY_TARGET=311
# first get the req2flatpak tool if not already present. Alternatively get req2flatpak from https://pypi.org/project/req2flatpak/
if [ ! -f "req2flatpak.py" ]; then
curl -O https://raw.githubusercontent.com/johannesjh/req2flatpak/main/req2flatpak.py
fi
python3 req2flatpak.py --requirements pymupdf==${PYMUPDF_VER} pymupdfb==${PYMUPDF_VER} --target-platforms ${PY_TARGET}-x86_64 ${PY_TARGET}-aarch64 --outfile python3-pymupdf.yaml
# build the openlp dependency file - remember to update requirements.txt if needed. Certain devel packages might be needed.
# first get the flatpak-pip-generator tool if not already present
if [ ! -f "flatpak-pip-generator" ]; then
curl -O https://raw.githubusercontent.com/flatpak/flatpak-builder-tools/master/pip/flatpak-pip-generator
fi
python flatpak-pip-generator --requirements-file requirements.txt
# Finally do the build
flatpak-builder --user --install --force-clean openlp-flatpak-builddir org.openlp.OpenLP.yml