Commit b49522c4 authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Build the bundle

parent 0dac4d74
......@@ -34,6 +34,17 @@ deb:
- public
expire_in: 1 week
flatpak:
image: debian:testing
stage: check
script: "./ci/flatpak.sh"
tags:
- privileged
artifacts:
paths:
- public
expire_in: 1 week
pages:
stage: manual
script: "./ci/pages.sh"
......
......@@ -44,6 +44,7 @@ include gnulib.am
include screenshots/Makefile.am
include nsi/Makefile.am
include debian/Makefile.am
include flatpak/Makefile.am
AM_CPPFLAGS += \
-DLOCALEDIR="\"$(localedir)\"" \
......
......@@ -21,4 +21,5 @@ EXTRA_DIST += \
%reldir%/pages.sh \
%reldir%/check.sh \
%reldir%/mingw.sh \
%reldir%/flatpak.sh \
%reldir%/deb.sh
#!/bin/sh
apt-get update || exit 1
apt-get install -y \
build-essential \
flatpak \
flatpak-builder \
libglib2.0-dev \
libreadline-dev \
libxml2 \
libxml2-dev \
nettle-dev \
ostree \
pkg-config \
texinfo \
valgrind \
|| exit 1
flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo || exit 1
flatpak install -y --user flathub org.freedesktop.Platform//18.08 || exit 1
flatpak install -y --user flathub org.freedesktop.Sdk//18.08 || exit 1
mkdir -p public || exit 1
VERSION=$(cat dist/version)
cp dist/tarot-$VERSION.tar.gz . || exit 1
tar xf tarot-$VERSION.tar.gz || exit 1
cd tarot-$VERSION
# disable-program is only for this configuration step.
./configure --disable-program || exit 1
make -j 8 flatpak-bundle || exit 1
cp tarot-latest.flatpak ../public/
make -j distclean || exit 1
cd ..
......@@ -68,6 +68,9 @@ AS_IF([test "x$host_cpu" = "xx86_64"], [
], [
AC_SUBST([DEBARCH], [$host_cpu])
])
AM_MISSING_PROG([FLATPAK], [flatpak])
AM_MISSING_PROG([FLATPAK_BUILDER], [flatpak-builder])
AC_ARG_VAR([FLATPAK_BUILDERFLAGS], [Additional flags to pass to flatpak-builder (such as --install, --gpg-sign=key...), but not --repo since we already build for the repo under tarot-flatpak in the build directory.])
# Checks for libraries.
gl_INIT
......@@ -76,7 +79,7 @@ AS_IF([test "x$enable_program" != "xno"], [
AC_MSG_ERROR([GObject was not found.])
])
PKG_CHECK_MODULES([CAIRO], [cairo cairo-png],, [
AC_MSG_ERROR([GObject was not found.])
AC_MSG_ERROR([Cairo was not found.])
])
PKG_CHECK_MODULES([GTK], [gtk+-3.0], [
AM_CONDITIONAL([WITH_GTK], [true])
......
# debian/Makefile.am
#
# Copyright (C) 2019 Vivien Kraus <vivien@planete-kraus.eu>
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
EXTRA_DIST += %reldir%/gen-manifest eu.planete_kraus.Tarot.json.in
MAINTAINERCLEANFILES += eu.planete_kraus.Tarot.json.in
.PHONY: flatpak flatpak-bundle clean-flatpak
flatpak_verbose = $(flatpak_verbose_@AM_V@)
flatpak_verbose_ = $(flatpak_verbose_@AM_DEFAULT_V@)
flatpak_verbose_0 = @echo " FLATPAK $@";
bundle_verbose = $(bundle_verbose_@AM_V@)
bundle_verbose_ = $(bundle_verbose_@AM_DEFAULT_V@)
bundle_verbose_0 = @echo " BUNDLE $@";
clean-local: clean-flatpak
eu.planete_kraus.Tarot.json.in: .version
$(AM_V_GEN) %reldir%/gen-manifest $(DIST_ARCHIVES) > $(srcdir)/eu.planete_kraus.Tarot.json.in
flatpak: dist eu.planete_kraus.Tarot.json.in
@rm -rf flatpak-build-dir
@mkdir -p flatpak-build-dir
@sed "s/GET_SHA256/$$(sha256sum $(DIST_ARCHIVES) | head -c 64)/g" $(srcdir)/eu.planete_kraus.Tarot.json.in > manifest.json
$(flatpak_verbose) $(FLATPAK_BUILDER) $(FLATPAK_BUILDERFLAGS) --extra-sources=. --repo=flatpak-repo flatpak-build-dir manifest.json
flatpak-bundle: flatpak
$(bundle_verbose) $(FLATPAK) build-bundle flatpak-repo tarot-latest.flatpak eu.planete_kraus.Tarot
clean-flatpak:
@rm -rf flatpak-build-dir
@rm -rf tarot-latest.flatpak
@rm -rf flatpak-repo
#!/bin/sh
ARCHIVE="$1"
cat <<EOF
{
"app-id": "eu.planete_kraus.Tarot",
"runtime": "org.freedesktop.Platform",
"sdk": "org.freedesktop.Sdk",
"runtime-version": "18.08",
"command": "tarot",
"finish-args": [
"--socket=x11",
"--socket=wayland",
"--share=ipc"
],
"cleanup": [
"/include",
"*.a",
"*.pc",
"libtarot/api.xml",
"*.gir",
"*.vapi",
"*.typelib"
],
"modules": [
{
"name": "tarot",
"buildsystem": "autotools",
"sources": [
{
"type": "archive",
"path": "$ARCHIVE",
"sha256": "GET_SHA256"
}
],
"config-opts": [
"--enable-silent-rules=yes"
]
}
]
}
EOF
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: tarot 0.4.2.83-ebdc-dirty\n"
"Report-Msgid-Bugs-To: vivien@planete-kraus.eu\n"
"POT-Creation-Date: 2019-04-26 22:24+0200\n"
"POT-Creation-Date: 2019-04-27 22:05+0200\n"
"PO-Revision-Date: 2019-04-22 15:59+0200\n"
"Last-Translator: Vivien Kraus <vivien@planete-kraus.eu>\n"
"Language-Team: French\n"
......
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