From 8b5e39f9941ffedec954d29bdaa6554609793659 Mon Sep 17 00:00:00 2001 From: Rinigus Date: Thu, 26 Mar 2020 13:44:02 +0200 Subject: [PATCH] update Flatpak README and scripts --- packaging/flatpak/README.md | 66 +++++++++++++------- packaging/flatpak/generate-flatpak-script.sh | 4 +- packaging/flatpak/mirage.flatpak.base.yaml | 4 ++ packaging/flatpak/mirage.flatpak.yaml | 4 ++ 4 files changed, 54 insertions(+), 24 deletions(-) diff --git a/packaging/flatpak/README.md b/packaging/flatpak/README.md index 6f0bc0af..51957e53 100644 --- a/packaging/flatpak/README.md +++ b/packaging/flatpak/README.md @@ -1,7 +1,50 @@ # Flatpak packaging +## Building Flatpak + +To build flatpak package, you will need flatpak, flatpak-builder, and +KDE 5.12 runtime with SDK. flatpak-builder is usually available from +the same repository as flatpak. See https://flatpak.org/setup/ for +setting it up. To install runtimes (adjust as needed if you prefer +system-wide installation): + +``` +flatpak install --user flathub org.kde.Platform//5.12 org.kde.Sdk//5.12 +``` + +To build, run from the root of the project: + +``` +flatpak-builder --repo=build/flatpak/repo --force-clean build/flatpak/build packaging/flatpak/mirage.flatpak.yaml +``` + +To create bundle, run + +``` +flatpak build-bundle build/flatpak/repo mirage.flatpak io.github.mirukana.mirage +``` + +Then you can install it with +``` +flatpak install --user mirage.flatpak +``` + +To run, either use your desktop environment or command line: +``` +flatpak run io.github.mirukana.mirage +``` + + ## Manifest +Manifest can be created using the included scripts, as described +below. Please note it is intended to be done by the maintainers +only. In particular, there could be some unexpected issues exposed by +updates in Python modules that have to be resolved. + +Manifest has to be updated by maintainers when the dependencies of +Mirage change, some updates in used Python modules are desired. + Flatpak packaging manifest is generated by running [generate-flatpak-script.sh](generate-flatpak-script.sh). This script requires `libolm` to be installed on the development PC as it will @@ -22,26 +65,3 @@ Flatpak manifest is created automatically by marked placeholder with Python module dependencies. -## Building Flatpak - -To build flatpak package, you will need flatpak, flatpak-builder, and -KDE 5.12 runtime with SDK. flatpak-builder is usually available from -the same repository as flatpak. See https://flatpak.org/setup/ for -setting it up. To install runtimes (adjust as needed if you prefer -system-wide installation): - -``` -flatpak install --user flathub org.kde.Platform//5.12 org.kde.Sdk//5.12 -``` - -To build, run from the root of the project: - -``` -flatpak-builder --repo=../flatpak-repo --force-clean flatpak-build packaging/flatpak/mirage.flatpak.yaml -``` - -To create bundle, run - -``` -flatpak build-bundle ../flatpak-repo ../mirage.flatpak io.github.mirukana.mirage -``` \ No newline at end of file diff --git a/packaging/flatpak/generate-flatpak-script.sh b/packaging/flatpak/generate-flatpak-script.sh index 6e52c59e..d1bc40a8 100755 --- a/packaging/flatpak/generate-flatpak-script.sh +++ b/packaging/flatpak/generate-flatpak-script.sh @@ -18,7 +18,9 @@ cat requirements.flatpak.txt ../../requirements.txt > requirements.txt flatpak-env/bin/pip install -Ur requirements.txt # freeze requirements and ignore blacklisted packages -flatpak-env/bin/pip freeze | grep -v PyYAML | grep -v six= | grep -v matrix-nio > flatpak-requirements.txt +flatpak-env/bin/pip freeze | \ + grep -v PyYAML | grep -v six= | \ + grep -v matrix-nio > flatpak-requirements.txt # generate flatpak requirements flatpak-env/bin/python flatpak-pip-generator --output flatpak-pip \ diff --git a/packaging/flatpak/mirage.flatpak.base.yaml b/packaging/flatpak/mirage.flatpak.base.yaml index 8a9639d6..8053d64c 100644 --- a/packaging/flatpak/mirage.flatpak.base.yaml +++ b/packaging/flatpak/mirage.flatpak.base.yaml @@ -100,6 +100,10 @@ modules: sources: - type: dir path: ../.. + skip: + - build + - .git + - .flatpak-builder # - name: mirage # buildsystem: qmake diff --git a/packaging/flatpak/mirage.flatpak.yaml b/packaging/flatpak/mirage.flatpak.yaml index f0833926..8be86ce4 100644 --- a/packaging/flatpak/mirage.flatpak.yaml +++ b/packaging/flatpak/mirage.flatpak.yaml @@ -714,3 +714,7 @@ modules: sources: - type: dir path: ../.. + skip: + - build + - .git + - .flatpak-builder