From 5ef1097f05f1684095806cdc35e14680809becf1 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 26 Nov 2022 13:25:30 +0200 Subject: [PATCH 22/22] flatpak: Add sdl2-client flatpak See osdn #46111 Signed-off-by: Marko Lindqvist --- Makefile.am | 1 + flatpak/build_flatpak.sh | 15 ++++++++++++++- flatpak/org.freeciv.sdl2.yml | 28 ++++++++++++++++++++++++++++ 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 flatpak/org.freeciv.sdl2.yml diff --git a/Makefile.am b/Makefile.am index 17f3e0ef98..0a37a4ca27 100644 --- a/Makefile.am +++ b/Makefile.am @@ -76,6 +76,7 @@ EXTRA_DIST = autogen.sh \ flatpak/org.freeciv.gtk322.yml \ flatpak/org.freeciv.mp.gtk3.yml \ flatpak/org.freeciv.qt.yml \ + flatpak/org.freeciv.sdl2.yml \ scripts/mapimg2anim \ scripts/setup_auth_server.sh \ scripts/diff_ignore \ diff --git a/flatpak/build_flatpak.sh b/flatpak/build_flatpak.sh index 8266a0b190..681abcb97d 100755 --- a/flatpak/build_flatpak.sh +++ b/flatpak/build_flatpak.sh @@ -1,14 +1,27 @@ #!/bin/bash +# Freeciv - Copyright (C) 2022 - The Freeciv Team +# 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 2, 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. + FCVER=$(../fc_version) if ! 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-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 + ! flatpak build-bundle repo "freeciv-qt-${FCVER}.flatpak" org.freeciv.qt || + ! flatpak build-bundle repo "freeciv-sdl2-${FCVER}.flatpak" org.freeciv.sdl2 then echo "FAILURE" >&2 exit 1 diff --git a/flatpak/org.freeciv.sdl2.yml b/flatpak/org.freeciv.sdl2.yml new file mode 100644 index 0000000000..c3e3075244 --- /dev/null +++ b/flatpak/org.freeciv.sdl2.yml @@ -0,0 +1,28 @@ +app-id: org.freeciv.sdl2 +runtime: org.freedesktop.Platform +runtime-version: '22.08' +sdk: org.freedesktop.Sdk +command: freeciv-sdl2 +rename-icon: freeciv-client +modules: + - name: sdl2-gfx + sources: + - type: archive + url: https://www.ferzkopp.net/Software/SDL2_gfx/SDL2_gfx-1.0.4.tar.gz + sha256: 63e0e01addedc9df2f85b93a248f06e8a04affa014a835c2ea34bfe34e576262 + - name: freeciv-sdl2 + 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=sdl2 --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.35.1