From c83d19072e90686575075f4ce4e6ce604d2afdfe Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Tue, 10 Jan 2023 23:22:30 +0200 Subject: [PATCH 35/35] flatpak: Add gtk4-client flatpak See osdn #46509 Signed-off-by: Marko Lindqvist --- Makefile.am | 1 + platforms/flatpak/build_flatpak.sh | 4 +++- platforms/flatpak/org.freeciv.gtk4.yml | 23 +++++++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 platforms/flatpak/org.freeciv.gtk4.yml diff --git a/Makefile.am b/Makefile.am index b6b14fb12c..5f73678b6d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -84,6 +84,7 @@ EXTRA_DIST = autogen.sh \ meson_options.txt \ platforms/flatpak/build_flatpak.sh \ platforms/flatpak/org.freeciv.gtk322.yml \ + platforms/flatpak/org.freeciv.gtk4.yml \ platforms/flatpak/org.freeciv.mp.gtk3.yml \ platforms/flatpak/org.freeciv.qt.yml \ platforms/flatpak/org.freeciv.sdl2.yml \ diff --git a/platforms/flatpak/build_flatpak.sh b/platforms/flatpak/build_flatpak.sh index 397e94216d..93d33e7d40 100755 --- a/platforms/flatpak/build_flatpak.sh +++ b/platforms/flatpak/build_flatpak.sh @@ -13,11 +13,13 @@ FCVER=$(../../fc_version) -if ! flatpak-builder --user --repo=repo --force-clean build org.freeciv.gtk322.yml || +if ! flatpak-builder --user --repo=repo --force-clean build org.freeciv.gtk4.yml || + ! flatpak-builder --user --repo=repo --force-clean build org.freeciv.gtk322.yml || ! flatpak-builder --user --repo=repo --force-clean build org.freeciv.mp.gtk3.yml || ! flatpak-builder --user --repo=repo --force-clean build org.freeciv.qt.yml || ! flatpak-builder --user --repo=repo --force-clean build org.freeciv.sdl2.yml || ! flatpak build-update-repo repo || + ! flatpak build-bundle repo "freeciv-gtk4-${FCVER}.flatpak" org.freeciv.gtk4 || ! flatpak build-bundle repo "freeciv-gtk3.22-${FCVER}.flatpak" org.freeciv.gtk322 || ! flatpak build-bundle repo "freeciv-mp-gtk3-${FCVER}.flatpak" org.freeciv.mp.gtk3 || ! flatpak build-bundle repo "freeciv-qt-${FCVER}.flatpak" org.freeciv.qt || diff --git a/platforms/flatpak/org.freeciv.gtk4.yml b/platforms/flatpak/org.freeciv.gtk4.yml new file mode 100644 index 0000000000..c70582b938 --- /dev/null +++ b/platforms/flatpak/org.freeciv.gtk4.yml @@ -0,0 +1,23 @@ +app-id: org.freeciv.gtk4 +runtime: org.gnome.Platform +runtime-version: '42' +sdk: org.gnome.Sdk +command: freeciv-gtk4 +rename-icon: freeciv-client +modules: + - name: freeciv-gtk4 + buildsystem: simple + build-commands: + # On git clone, regenerate configure with autogen.sh + - if test -f ./.git && test -x ./autogen.sh ; then ./autogen.sh --no-configure-run ; fi + - mkdir build + - cd build && ../configure --prefix=/app --enable-client=gtk4 --disable-fcmp --disable-freeciv-manual && make -j$(nproc) && make install + sources: + - type: dir + path: ../.. +finish-args: + - --socket=wayland + - --socket=fallback-x11 + - --share=network + - --socket=pulseaudio + - --filesystem=~/.freeciv:create -- 2.39.0