Commit 53fb3da6 authored by Vivien Kraus's avatar Vivien Kraus
Browse files

Flatpak repo

parent b1e44e60
Pipeline #94645 passed with stages
in 17 minutes
......@@ -4,6 +4,7 @@ stages:
- dist
- check
- manual
- package
dist:
stage: dist
......@@ -26,4 +27,16 @@ pages:
artifacts:
paths:
- public
expire_in: 1 week
flatpak:
stage: package
image: tarotbis/package:latest
script: "./ci/flatpak.sh"
tags:
- privileged
artifacts:
paths:
- flatpak
- tarot.flatpakrepo
expire_in: 1 week
\ No newline at end of file
......@@ -65,7 +65,9 @@ EXTRA_DIST = \
lib-library/m4/gnulib-cache.m4 \
$(top_srcdir)/.version \
.gitlab-ci.yml \
$(VALGRIND_SUPPRESSION_FILE)
$(VALGRIND_SUPPRESSION_FILE) \
eu.planete_kraus.Tarot.json \
fix-libopts
BUILT_SOURCES = \
$(top_srcdir)/.version
CLEANFILES =
......
......@@ -31,10 +31,11 @@ gnulib-tool --libtool \
--source-base=lib-program \
--m4-base=lib-program/m4 \
--macro-prefix=gl_program \
--import assert readline git-version-gen || exit 1
--import assert readline git-version-gen getopt-gnu || exit 1
rm -rf libopts libopts-* || exit 1
gunzip -c `autoopts-config libsrc` | tar -xvf - || exit 1
mv -f libopts-*.*.* libopts || exit 1
./fix-libopts || exit 1
cp -fp libopts/m4/*.m4 lib-program/m4/. || exit 1
autoreconf -vif || exit 1
rm doc/tarot.texi || exit 1
......@@ -19,4 +19,5 @@
EXTRA_DIST += \
%reldir%/dist.sh \
%reldir%/pages.sh \
%reldir%/check.sh
%reldir%/check.sh \
%reldir%/flatpak.sh
#!/bin/bash
VERSION=$(cat public/version)
gpg --import /tarot.gpg || exit 1
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo || exit 1
flatpak install -y flathub org.freedesktop.Platform//18.08 org.freedesktop.Sdk//18.08 || exit 1
cp public/tarot-$VERSION.tar.gz ./upstream.tar.gz || exit 1
rm -rf build-dir || exit 1
flatpak-builder build-dir eu.planete_kraus.Tarot.json || exit 1
echo "help" | flatpak-builder --run build-dir eu.planete_kraus.Tarot.json tarot || exit 1
flatpak-builder --repo=flatpak --gpg-sign=C8ECB5A2 --force-clean build-dir eu.planete_kraus.Tarot.json || exit 1
cat > tarot.flatpakrepo <<EOF
[Flatpak Repo]
Title = Tarot repository -- $CI_COMMIT_REF_NAME
Url = $CI_PROJECT_URL/-/jobs/artifacts/$CI_COMMIT_REF_NAME/raw/flatpak?job=$CI_JOB_NAME
Homepage = https://gugurumbe.frama.io/tarot/share/doc/tarot/tarot.html/index.html
Comment = The Amazing Repository Of TAROT
Description = This is where I host the flatpaks for my personal project, only for the reference $CI_COMMIT_REF_NAME
Icon = https://dl.flathub.org/repo/logo.svg
GPGKey = $(gpg --export C8ECB5A2 | base64 --wrap=0)
EOF
......@@ -51,6 +51,8 @@ PKG_CHECK_MODULES([XML], [libxml-2.0])
LIBOPTS_CHECK
# Checks for header files.
AC_HEADER_STDBOOL
AC_CHECK_HEADERS_ONCE([stdint.h limits.h sysexits.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
......
{
"app-id": "eu.planete_kraus.Tarot",
"runtime": "org.freedesktop.Platform",
"runtime-version": "18.08",
"sdk": "org.freedesktop.Sdk",
"command": "tarot",
"modules": [
{
"name": "tarot",
"buildsystem": "autotools",
"sources": [
{
"type": "archive",
"path": "upstream.tar.gz"
}
]
}
]
}
#!/bin/sh
sed -i 's/#include <verify\.h>/#define libopts_static_assert(whatever, line) typedef char verification_line_##line[(whatever) ? 1 : -1];\n#define verify(whatever) libopts_static_assert (whatever, __LINE__)/g' libopts/intprops.h || exit 1
......@@ -47,7 +47,8 @@ LIBTAROT_VERSION_INFO=0:0:0
%reldir%/tarot-opts.h
%canon_reldir%_tarot_CFLAGS = \
$(AM_CFLAGS) \
$(LIBOPTS_CFLAGS)
$(LIBOPTS_CFLAGS) \
-include config.h
%canon_reldir%_tarot_CXXFLAGS = \
$(AM_CXXFLAGS)
%canon_reldir%_tarot_CPPFLAGS = \
......
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