summaryrefslogtreecommitdiff
path: root/.gitlab-ci/flatpak-build.sh
blob: 72397cc7ea6d03bb18504c9e6f47a739df792c54 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash

set -e

appid=$1

builddir=flatpak_app
repodir=repo

flatpak-builder \
        --user --disable-rofiles-fuse \
        --stop-at=gtk \
        ${builddir} \
        build-aux/flatpak/${appid}.json

flatpak build ${builddir} meson \
                --prefix=/app \
                --libdir=/app/lib \
                --buildtype=release \
                -Dx11-backend=true \
                -Dwayland-backend=true \
                -Dprint-backends=file \
                -Dbuild-tests=false \
                -Dbuild-examples=false \
                -Dintrospection=disabled \
                -Ddemos=true \
                _flatpak_build

flatpak build ${builddir} ninja -C _flatpak_build install

flatpak-builder \
        --user --disable-rofiles-fuse \
        --finish-only \
        --repo=${repodir} \
        ${builddir} \
        build-aux/flatpak/${appid}.json

flatpak build-bundle \
        ${repodir} \
        ${appid}-dev.flatpak \
        --runtime-repo=https://nightly.gnome.org/gnome-nightly.flatpakrepo \
        ${appid}

# to be consumed by the nightly publish jobs
if [[ $CI_COMMIT_BRANCH == master ]]; then
        tar cf repo.tar ${repodir}
fi