Commit 360c45e5 authored by Milan Crha's avatar Milan Crha

Update flatpak README

Sync its content with the online page. Also do not reference
anymore, the GNOME SDK had been moved to flathub.
parent 736a5a32
......@@ -2,6 +2,13 @@ This directory contains files related to Flatpak build of Evolution. Apart
of Evolution itself, it builds also evolution-data-server, and uses it,
the same as evolution-ews for Exchange Web Services accounts.
=== Online version of the manual ===
An online version of this manual can be found here:
=== Prerequisites ===
The build uses GNOME Flatpak SDK and runtime.
To build it, one can follow the below commands, which expect flatpak and
......@@ -9,67 +16,120 @@ flatpak-builder installed. Refer to the Flatpak developer documentation
and command man pages for the meaning of respective arguments.
Note the actual versions of the GNOME SDK and Platform (below is used
version 3.26) can differ each release of Evolution. The exact expected
version 3.30) can differ each release of Evolution. The exact expected
version can be seen (or changed) in the .json file, the runtime-version
key (line "runtime-version": "3.26",). Use the same version in the below
key (line "runtime-version": "3.30",). Use the same version in the below
install commands as is written in the runtime-version key of the .json file.
To prepare Flatpak, add GNOME repository and install the SDK and Platform:
Evolution uses GNOME SDK and Platform, which is current hosted on the flathub.
If there's preinstalled a flathub repository in the system, then skip
the flatpak remote-add command below. The GNOME SDK and Platform can be
installed with:
flatpak remote-add --from flathub
flatpak install flathub org.gnome.Platform//3.30
flatpak install flathub org.gnome.Sdk//3.30
If it's required to install the GNOME SDK and Platform only for the current
user, rather than system wide (also to not require root password), then
install it with --user argument, like this:
flatpak --user remote-add --from flathub
flatpak --user install flathub org.gnome.Platform//3.30
flatpak --user install flathub org.gnome.Sdk//3.30
And that's all with respect of prerequisites. All the rest is handled
by Flatpak and Evolution build script.
=== Prepare the build directory ===
Choose a directory where the Flatpak will build Evolution. Let's use
a directory in the user home, like ~/flatpak, which can be prepared by:
mkdir ~/flatpak
cd ~/flatpak
Get the build script now, using wget command:
There's everything ready to start the build now.
$ flatpak remote-add --from gnome
$ flatpak install gnome org.gnome.Platform//3.26
$ flatpak install gnome org.gnome.Sdk//3.26
=== Build Evolution ===
After this, Evolution can be built. While the below commands build the git master
version of Evolution, it can be changed to the stable version, when all "-master"
occurrences are replaced with "-stable":
To build Evolution in Flatpak, run the below command:
$ flatpak-builder --force-clean org.gnome.Evolution-master org.gnome.Evolution-master.json
flatpak-builder --force-clean org.gnome.Evolution-stable org.gnome.Evolution-stable.json
The above command can be repeated multiple times, for cases when the build fails
and any changes are required.
and flatpak-builder will do everything what is needed to build Evolution,
including downloading other dependencies and building them.
Once it's built, Flatpak requires the built application to be added as a repository,
which means to create, add and install it:
=== Flatpak repository ===
$ flatpak build-export repo-master org.gnome.Evolution-master
$ flatpak --user remote-add --no-gpg-verify --if-not-exists evolution-repo-master repo-master
$ flatpak --user install evolution-repo-master org.gnome.Evolution
Flatpak requires the local build to be part of a repository, thus create
one for it and add it to Flatpak:
And it's basically it. The last thing is to run the flatpak version of Evolution:
flatpak build-export repo-stable org.gnome.Evolution-stable
flatpak --user remote-add --no-gpg-verify --if-not-exists evolution-repo-stable repo-stable
$ flatpak run org.gnome.Evolution
Evolution can be installed from this repository now:
In some cases one might need to debug the build environment, which can be done
with the following command. It opens a bash terminal where can be examined
built data in the /app prefix:
flatpak --user install evolution-repo-stable org.gnome.Evolution
$ flatpak run --devel --command=bash org.gnome.Evolution
=== Run Evolution ===
A short command to rebuild any changes, refresh the repository and update
installed Evolution from this repository can look like:
To run the built Evolution, use this command:
$ flatpak-builder --force-clean org.gnome.Evolution-master org.gnome.Evolution-master.json && \
flatpak build-export repo-master org.gnome.Evolution-master && \
flatpak --user update org.gnome.Evolution
flatpak run org.gnome.Evolution
Note the above commands install the Evolution as a user repository, not
as a system repository, while the GNOME platform and SDK are installed
into the system repository (which requires root password). Add --user
argument to the first three commands at the top to avoid the root requirement.
And that's it.
Finally, to clean up installed Flatpak data, check what is installed:
=== Receiving updates ===
$ flatpak list
Evolution is built from git checkout, which allows to rebuild it from
the latest sources. To do so, move to the build folder and rebuild it:
cd ~/flatpak
flatpak-builder --force-clean org.gnome.Evolution-stable org.gnome.Evolution-stable.json
Once the build is done, its repository needs to be refreshed with the built
flatpak build-export repo-stable org.gnome.Evolution-stable
Finally, update Evolution from the refreshed repository with:
flatpak --user update org.gnome.Evolution
Then run Evolution as before:
flatpak run org.gnome.Evolution
The Flatpak build of Evolution shows the git commit ID in Help->About at which
the Evolution was when it had been built. It can be used to verify that
the build contains the latest changes.
=== Clean up Flatpak data ===
As a quick reference, in case of removing the Flatpak version of Evolution
from the system, check what is installed first:
flatpak list
and remove Evolution from there:
$ flatpak --user uninstall org.gnome.Evolution
flatpak --user uninstall org.gnome.Evolution
Then also check what repositories are installed:
$ flatpak remotes
flatpak remotes
and remove the custom Evolution repository with:
$ flatpak --user remote-delete evolution-repo-master
flatpak --user remote-delete evolution-repo-stable
Sometimes the build can fail or be stopped by the user, then
the flatpak-builder can left whole checkout without erasing it.
In such cases, the files are stored in ~/flatpak/.flatpak-builder/build.
The folder should be empty when nothing is building, thus remove anything
left there after the build ends.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment