Commit c9eba7cc authored by Milan Crha's avatar Milan Crha
Browse files

Add flatpak build script

See the flatpak/README file for more information.
parent 0992c54c
.flatpak-builder
org.gnome.Evolution-master
org.gnome.Evolution-stable
repo-master
repo-stable
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.
The build uses GNOME Flatpak SDK and runtime.
To build it, one can follow the below commands, which expect flatpak and
flatpak-builder installed. Refer to the Flatpak developer documentation
and command man pages for the meaning of respective arguments.
To prepare Flatpak, add GNOME repository and install the SDK and Platform:
$ flatpak remote-add --from gnome https://sdk.gnome.org/gnome.flatpakrepo
$ flatpak install gnome org.gnome.Platform//3.24
$ flatpak install gnome org.gnome.Sdk//3.24
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":
$ flatpak-builder --force-clean org.gnome.Evolution-master org.gnome.Evolution-master.json
The above command can be repeated multiple times, for cases when the build fails
and any changes are required.
Once it's built, Flatpak requires the built application to be added as a repository,
which means to create, add and install it:
$ 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
And it's basically it. The last thing is to run the flatpak version of Evolution:
$ flatpak run org.gnome.Evolution
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 run --devel --command=bash org.gnome.Evolution
A short command to rebuild any changes, refresh the repository and update
installed Evolution from this repository can look like:
$ 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
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.
Finally, to clean up installed Flatpak data, check what is installed:
$ flatpak list
and remove Evolution from there:
$ flatpak --user uninstall org.gnome.Evolution
Then also check what repositories are installed:
$ flatpak remotes
and remove the custom Evolution repository with:
$ flatpak --user remote-delete evolution-repo-master
{
"app-id": "org.gnome.Evolution",
"runtime": "org.gnome.Platform",
"runtime-version": "3.24",
"sdk": "org.gnome.Sdk",
"command": "evolution",
"rename-desktop-file": "evolution.desktop",
"rename-icon": "evolution",
"copy-icon": true,
"branch": "master",
"desktop-file-name-suffix": " (Development)",
"tags": [ "devel" ],
"build-options" : {
"cflags": "-O2 -g -Wno-deprecated-declarations",
"cxxflags": "-O2 -g -Wno-deprecated-declarations"
},
"cleanup": [
"/include",
"/lib/pkgconfig",
"/share/pkgconfig",
"/share/aclocal",
"*.la",
"*.a"
],
"finish-args": [
"--socket=x11",
"--share=ipc",
"--socket=wayland",
"--socket=pulseaudio",
"--share=network"
],
"modules": [
{
"name": "libical",
"cleanup": [ "/lib/cmake" ],
"buildsystem": "cmake",
"config-opts": [
"-DCMAKE_INSTALL_LIBDIR:PATH=/app/lib",
"-DBUILD_SHARED_LIBS:BOOL=ON",
"-DGOBJECT_INTROSPECTION:BOOL=OFF"
],
"sources": [
{
"type": "archive",
"url": "https://github.com/libical/libical/releases/download/v2.0.0/libical-2.0.0.tar.gz",
"sha256": "654c11f759c19237be39f6ad401d917e5a05f36f1736385ed958e60cf21456da"
}
]
},
{
"name": "liboauth",
"config-opts": [ "--enable-nss" ],
"cleanup": [ "/share/man" ],
"sources": [
{
"type": "archive",
"url": "https://downloads.sourceforge.net/project/liboauth/liboauth-1.0.3.tar.gz",
"sha256": "0df60157b052f0e774ade8a8bac59d6e8d4b464058cc55f9208d72e41156811f"
}
]
},
{
"name": "libgdata",
"config-opts": [
"--disable-always-build-tests",
"--disable-goa",
"--disable-gtk-doc",
"--disable-introspection",
"--disable-installed-tests",
"--disable-vala"
],
"cleanup": [
"/share/gtk-doc"
],
"sources": [
{
"type": "archive",
"url": "https://download.gnome.org/sources/libgdata/0.17/libgdata-0.17.9.tar.xz",
"sha256": "85c4f7674c0098ffaf060ae01b6b832cb277b3673d54ace3bdedaad6b127453a"
}
]
},
{
"name": "geocode-glib",
"config-opts": [
"--disable-introspection",
"--disable-gtk-doc"
],
"cleanup": [
"/share/gtk-doc"
],
"sources": [
{
"type": "archive",
"url": "https://download.gnome.org/sources/geocode-glib/3.24/geocode-glib-3.24.0.tar.xz",
"sha256": "19c1fef4fd89eb4bfe6decca45ac45a2eca9bb7933be560ce6c172194840c35e"
}
]
},
{
"name": "libgweather",
"config-opts": [
"--disable-glade-catalog",
"--disable-introspection",
"--disable-vala"
],
"cleanup": [
"/share/gtk-doc"
],
"sources": [
{
"type": "archive",
"url": "https://download.gnome.org/sources/libgweather/3.24/libgweather-3.24.1.tar.xz",
"sha256": "1227316037b63dac4153031a22abccb3d2ac679a7409e29cd303eec499eb653c"
}
]
},
{
"name": "openldap",
"cleanup": [
"/bin",
"/share/man"
],
"config-opts": [
"--disable-backends",
"--disable-overlays",
"--disable-slapd",
"--disable-debug",
"--enable-dynamic",
"--without-threads",
"--with-tls=gnutls"
],
"sources": [
{
"type": "archive",
"url": "http://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.4.45.tgz",
"sha256": "cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb897cd5626df3824"
}
]
},
{
"name": "dconf",
"config-opts": [
"--disable-gtk-doc",
"--disable-man"
],
"cleanup": [
"/share/bash-completion",
"/share/gtk-doc",
"/share/vala"
],
"sources": [
{
"type": "archive",
"url": "https://download.gnome.org/sources/dconf/0.26/dconf-0.26.0.tar.xz",
"sha256": "8683292eb31a3fae31e561f0a4220d8569b0f6d882e9958b68373f9043d658c9"
}
]
},
{
"name": "libgpg-error",
"cleanup": [
"/bin",
"/share/common-lisp",
"/share/info",
"/share/man"
],
"sources": [
{
"type": "archive",
"url": "https://www.gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.27.tar.bz2",
"sha256": "4f93aac6fecb7da2b92871bb9ee33032be6a87b174f54abf8ddf0911a22d29d2"
}
]
},
{
"name": "libgcrypt",
"cleanup": [
"/bin",
"/share/info",
"/share/man"
],
"sources": [
{
"type": "archive",
"url": "https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.8.1.tar.bz2",
"sha256": "7a2875f8b1ae0301732e878c0cca2c9664ff09ef71408f085c50e332656a78b3"
}
]
},
{
"name": "gnome-keyring",
"config-opts": [
"--with-pkcs11-config=/app/share/gk-to-remove",
"--with-pkcs11-modules=/app/share/gk-to-remove",
"--disable-doc",
"--disable-pam",
"--disable-p11-tests",
"--disable-ssh-agent"
],
"cleanup": [
"/etc/xdg",
"/share/gk-to-remove",
"/share/GConf"
],
"sources": [
{
"type": "archive",
"url": "https://download.gnome.org/sources/gnome-keyring/3.20/gnome-keyring-3.20.1.tar.xz",
"sha256": "97964e723f454be509c956ed5e38b5c2fd7363f43bd3f153b94a4a63eb888c8c"
}
]
},
{
"name": "evolution-data-server",
"buildsystem": "cmake",
"cleanup": [ "/share/GConf" ],
"config-opts": [
"-DENABLE_FILE_LOCKING=fcntl",
"-DENABLE_DOT_LOCKING=OFF",
"-DENABLE_GOOGLE_AUTH=ON",
"-DENABLE_GTK=ON",
"-DENABLE_UOA=OFF",
"-DENABLE_GOA=OFF",
"-DENABLE_EXAMPLES=OFF",
"-DENABLE_INTROSPECTION=OFF",
"-DENABLE_VALA_BINDINGS=OFF",
"-DENABLE_INSTALLED_TESTS=OFF",
"-DENABLE_GTK_DOC=OFF",
"-DWITH_PRIVATE_DOCS=OFF",
"-DWITH_PHONENUMBER=OFF",
"-DWITH_SYSTEMDUSERUNITDIR=OFF"
],
"sources": [
{
"type": "git",
"url": "https://git.gnome.org/browse/evolution-data-server",
"branch": "master"
}
]
},
{
"name": "gtkspell3",
"config-opts": [
"--disable-gtk-doc",
"--disable-introspection",
"--disable-vala"
],
"cleanup": [ "/share/gtk-doc" ],
"sources": [
{
"type": "archive",
"url": "https://downloads.sourceforge.net/project/gtkspell/3.0.9/gtkspell3-3.0.9.tar.xz",
"sha256": "a4f4a4a2789f7499563e26d96b22d8085222ebe278da47d026b2de782b8b4d26"
}
]
},
{
"name": "evolution",
"buildsystem": "cmake",
"config-opts": [
"-DVERSION_SUBSTRING:STRING=' (flatpak)'",
"-DENABLE_AUTOAR=OFF",
"-DENABLE_CONTACT_MAPS=OFF",
"-DENABLE_GNOME_DESKTOP=OFF",
"-DENABLE_GTK_DOC=OFF",
"-DENABLE_INSTALLED_TESTS=OFF",
"-DENABLE_LIBCRYPTUI=OFF",
"-DENABLE_PST_IMPORT=OFF",
"-DENABLE_TEXT_HIGHLIGHT=OFF",
"-DENABLE_YTNEF=OFF",
"-DWITH_GLADE_CATALOG=OFF",
"-DWITH_HELP=OFF"
],
"cleanup": [
"/etc/xdg",
"/share/GConf"
],
"sources": [
{
"type": "git",
"url": "https://git.gnome.org/browse/evolution",
"branch": "master"
},
{
"type": "script",
"commands": [
"echo evolution-flatpak | /app/bin/gnome-keyring-daemon --daemonize --unlock &",
"/app/libexec/dconf-service &",
"sleep 1",
"/app/libexec/evolution-source-registry &",
"sleep 1",
"/app/libexec/evolution-addressbook-factory -r &",
"/app/libexec/evolution-calendar-factory -r &",
"sleep 1",
"/app/bin/evolution.bin",
"sleep 3"
],
"dest-filename": "flatpak-evolution-wrapper.sh"
},
{
"type": "script",
"commands": [ "dbus-run-session /app/bin/evolution-wrapper" ],
"dest-filename": "flatpak-evolution-run.sh"
}
],
"post-install": [
"mv /app/bin/evolution /app/bin/evolution.bin",
"cp flatpak-evolution-run.sh /app/bin/evolution",
"cp flatpak-evolution-wrapper.sh /app/bin/evolution-wrapper"
]
},
{
"name": "libmspack",
"cleanup": [ "/bin" ],
"sources": [
{
"type": "archive",
"url": "https://www.cabextract.org.uk/libmspack/libmspack-0.6alpha.tar.gz",
"sha256": "1edbee82accb28e679ab538f803aab7a5a569e4102ccf1715b462b1bd915f921"
}
]
},
{
"name": "evolution-ews",
"buildsystem": "cmake",
"sources": [
{
"type": "git",
"url": "https://git.gnome.org/browse/evolution-ews",
"branch": "master"
}
]
}
]
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment