2018-05-06 19:52:49 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# SPDX-License-Identifier: GPL-3.0+
|
|
|
|
#
|
2021-11-08 13:27:45 +08:00
|
|
|
# Copyright © 2018-2021 by The qTox Project Contributors
|
2018-05-06 19:52:49 +08:00
|
|
|
|
|
|
|
# Fail out on error
|
|
|
|
set -exuo pipefail
|
|
|
|
|
|
|
|
# use multiple cores when building
|
|
|
|
export MAKEFLAGS="-j$(nproc)"
|
2021-11-08 13:27:45 +08:00
|
|
|
FLATPAK_DESCRIPTOR=$(dirname $(realpath $0))/io.github.qtox.qTox.json
|
2018-05-06 19:52:49 +08:00
|
|
|
|
2021-11-08 13:27:45 +08:00
|
|
|
mkdir -p /flatpak-build
|
|
|
|
cd /flatpak-build
|
2020-03-14 23:15:15 +08:00
|
|
|
|
2018-05-06 19:52:49 +08:00
|
|
|
# Build the qTox flatpak
|
2021-11-08 13:27:45 +08:00
|
|
|
flatpak-builder --disable-rofiles-fuse --install-deps-from=flathub --force-clean --repo=qtox-repo build "$FLATPAK_DESCRIPTOR"
|
2018-05-06 19:52:49 +08:00
|
|
|
|
|
|
|
# Create a bundle for distribution
|
2021-11-08 13:27:45 +08:00
|
|
|
flatpak build-bundle qtox-repo qtox.flatpak io.github.qtox.qTox
|
|
|
|
|
|
|
|
cp qtox.flatpak /qtox
|
2018-05-06 19:52:49 +08:00
|
|
|
|